Forum Discussion
JanetHaw
Feb 22, 2024Copper Contributor
Excel sum/counting issue
Hi there. am literally pulling my hair out and wonder if anyone else has come across this issue and can advise. Use excel all the time.. got a new laptop from work last week .. was OK and still ...
jimmyetf
Oct 09, 2024Copper Contributor
Hello, I have had problems (it does not add, it only counts rows), with Excel, no matter how many times I changed the format it did not work.
I was able to correct it with the following macro,
------------------------------------------------------------
' MACRO PARA PASAR EL TEXTO A NÚMERO
Sub TextoANumero()
Dim TotalFilas As Long
Dim Columna As String
Columna = InputBox("Ingresa la columna que hace el recuento y no puede sumar", "PCNautas - RECUENTO A VALOR")
TotalFilas = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To TotalFilas
Range(Columna & i).Select
ActiveCell.FormulaR1C1 = Range(Columna & i).Value
Next
MsgBox("PCNautas - Macro Finalizada")
End Sub
------------------------------------------------------------
The explanation of how it works is in the following URL:
https://ir11.pe/Hye
I was able to correct it with the following macro,
------------------------------------------------------------
' MACRO PARA PASAR EL TEXTO A NÚMERO
Sub TextoANumero()
Dim TotalFilas As Long
Dim Columna As String
Columna = InputBox("Ingresa la columna que hace el recuento y no puede sumar", "PCNautas - RECUENTO A VALOR")
TotalFilas = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To TotalFilas
Range(Columna & i).Select
ActiveCell.FormulaR1C1 = Range(Columna & i).Value
Next
MsgBox("PCNautas - Macro Finalizada")
End Sub
------------------------------------------------------------
The explanation of how it works is in the following URL:
https://ir11.pe/Hye