Subtraction between to excel column using VBScript

前端 未结 2 581
猫巷女王i
猫巷女王i 2021-01-28 01:39

Suppose I have below excel sheet,And I need to find the difference between them and result need to put back to another column:

      ColA                      Co         


        
2条回答
  •  梦谈多话
    2021-01-28 02:17

    You can subtract one date from the other, and then set the formatting of the cell:

    'Within the Do..While loop
    Dim cell
    Set cell = objSheet4.Cells(intRow4,11)
    cell.Value = Date2 - Date1
    cell.NumberFormat = "hh:mm:ss"
    

提交回复
热议问题