Excel column format

Hi friends

Can anyone send me VBA code for changing the excel column to Number format.
Currenty its text. i want to change the whole column format to “Number”.

Thanks.

hi @oshan,

You can use following code, with Invoke VBA activity.

Sub textToNum()

    Columns("D:D").Select
    Selection.NumberFormat = "0.00"
End Sub

Indead of D, you’ve to put your column.
You can also specify decimal places, if 1 —> Selection.NumberFormat = “0.0”

2 Likes