Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
I have a formula in cell - =IF(J45="","",(J45+181)), where if j45 is blank, the cell h45 is blank or h45 has a new date, the format of the coloumn "H" is date. I my VB code I am using this column to satify a condition and my code is For rwIndex = 4 To 40 Year(Worksheets("Sheet1").Cells(rwIndex, 12).Value) = Year(Mydate) Then Worksheets("Sheet1").Cells(rwIndex, 12).Interior.Color = RGB(0, 0, 255) I am getting Runtime error '13' - Type Mismatch, because few cells blank, because of the cell formula IF(J45="","",(J45+181)) Please advise how can I correct the VB code |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Type Mismatch Error - Help Please | Excel Worksheet Functions | |||
Macro error type mismatch | Excel Discussion (Misc queries) | |||
Type Mismatch Error | Excel Discussion (Misc queries) | |||
Visual Basic macro run time error(13) type mismatch | Excel Discussion (Misc queries) | |||
Why type mismatch - R/T error 13 | Excel Discussion (Misc queries) |