By: Shanto

In reply to polina.

Hello Polina. Thanks for asking. Basically, you have to change the cell references here.
Suppose you have data in the following ranges:
1. N3:N13
2. P1:P19
3. AB13:AB20
4. CC10:CC20

Just use the following code:

Sub ConvertTextToNumber()
With Range(“N3:N13”)
.NumberFormat = “General”
.Value = .Value
End With

With Range(“P1:P19”)
.NumberFormat = “General”
.Value = .Value
End With

With Range(“AB13:AB20”)
.NumberFormat = “General”
.Value = .Value
End With

With Range(“CC10:CC20”)
.NumberFormat = “General”
.Value = .Value
End With

End Sub

There are various ways. But this is the simplest.