Actually the Column A Contains numbers in text format if I change the format it would become normal. Suggest any VB Code to get it
can you put the sample input
Try this code:
Sub ConvertTextToNumbers()
Dim cell As Range
For Each cell In Range("A:A").SpecialCells(xlCellTypeConstants)
If IsNumeric(cell.Value) Then
cell.Value = Val(cell.Value)
End If
Next cell
End Sub
In the meanwhile an input will help us.
Regards
How to use it for multiple column for example Column A,G,L
Provide the input bro. It will help me.
Try this code by the time:
Sub ConvertColumnsToNumbers()
Dim columnRange As Range
' Convert entire columns A, G, and L to number format
For Each columnRange In Range("A:A,G:G,L:L").Columns
columnRange.NumberFormat = "General"
columnRange.Value = columnRange.Value
Next columnRange
End Sub
Regards
Thank you Varunraj it’s working fine
1 Like
You’re welcome @Gopi_Krishna1
Happy Automation!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.