Excel vba 計算時間的問題?

我想問下如果我想在vba裡計算時間要怎樣寫呢?

我試過下面咁寫就唔得

Cells(i, 19).Value = Cells(i, 5).Value - #9:30:00 AM#

更新:

謝謝你的解答先!

在column E 的內容只有文字"Book" or "On" or Time,所以我都已經在上面加咗一句,但都係唔得,為什麼呢?

If Cells(i, 5) <> "Book" Or Cells(i, 5) <> "On" Then

If Cells(i, 5).Value >= TimeSerial(9, 35, 0) Then

更新 3:

f Cells(i, 5).Value <> "Book" Or Cells(i, 5) <> "On" Then

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.