I'm running an If/And statement and getting a Type Mismatch error. The If statement is checking to see if the cell (which is actually 8 cells in column Y merged together) is blank and if it is more than 30 days before today's date. I am also looping this, so I'm using a variable, Q, to reference the row number. Here is the code:
I tried just referenceing the merged cell by using (Q-1) alone, which is its highest cell, but that gives me the same error. It's the end of the day, and I'm sure I'm missing something obvious, but I can't seem to figure this out!
Any help you can give me is greatly appreciated. Thanks!
Hank
Code:
If ActiveSheet.Range("Y" & (Q - 1) & ":Y" & (Q + 6)) <> "" And (Date - Range("Y" & (Q - 1) & ":Y" & (Q + 6)).Value) > 30 Then
I tried just referenceing the merged cell by using (Q-1) alone, which is its highest cell, but that gives me the same error. It's the end of the day, and I'm sure I'm missing something obvious, but I can't seem to figure this out!
Any help you can give me is greatly appreciated. Thanks!
Hank