2
下面的宏有什麼問題?我只想評估一個選項卡中的一個單元格是否大於另一個選項卡中的另一個單元格。然後MSGBOX:宏如果,然後...沒有找到錯誤
Sub Comhouse()
If Worksheets("(2.2) TRA worksheet").Range("AU425").Value > Worksheets("(2.0) Hotel Inventory").Range("S421").Value Then
MsgBox ("Please check inventory imputed in Com and House for every day as it may be exiding the total inventory available")
Exit Sub
Else
MsgBox ("All correct")
End If
End Sub
似乎是確定,是在細胞中的值是否正確?他們是有效的數字嗎? – agold
什麼錯誤引發你? – Trimax
你是否正確處理了空值? – Greg