How to change Format of a Cell to Text using VBA

前端 未结 4 1359
一整个雨季
一整个雨季 2020-12-03 04:34

I have a "duration" column in an Excel sheet. Its cell format always changes — I want convert the duration from minutes to seconds, but because of the cell formatt

4条回答
  •  -上瘾入骨i
    2020-12-03 04:41

    Well this should change your format to text.

    Worksheets("Sheetname").Activate
    Worksheets("SheetName").Columns(1).Select 'or Worksheets("SheetName").Range("A:A").Select
    Selection.NumberFormat = "@"
    

提交回复
热议问题