How to format column to number format in Excel sheet?

后端 未结 3 511
终归单人心
终归单人心 2020-12-19 04:41

Below is the VBA code. Sheet2 contains all of the values in general format. After running the code, values in column \'C\' of Sheet3 contain exponential values for numbers

3条回答
  •  天涯浪人
    2020-12-19 05:19

    This will format column A as text, B as General, C as a number.

    Sub formatColumns()
     Columns(1).NumberFormat = "@"
     Columns(2).NumberFormat = "General"
     Columns(3).NumberFormat = "0"
    End Sub
    

提交回复
热议问题