ClimoC
Well-known Member
- Joined
- Aug 21, 2009
- Messages
- 584
Hello
Just having a little trouble with syntax. Just need to do this:
"If the month in date cell in col G is the same month as shown in cell M1, Then (proceed)"
It's got an OFFSET because it is running through rows in a table and checking two conditions. Here's the For and If statement which I need corrected:
Here though it is looking at cell AS5, which is the first of the month which is set by cell M1. So It can either look at AS5 or at M1, the answer (the month) will be the same in both those cells.
Anyone help?
Cheers
Just having a little trouble with syntax. Just need to do this:
"If the month in date cell in col G is the same month as shown in cell M1, Then (proceed)"
It's got an OFFSET because it is running through rows in a table and checking two conditions. Here's the For and If statement which I need corrected:
Code:
For Each zp In Range("A6:A500")
If zp.Offset(0, 8).Font.Strikethrough = False And zp.Offset(0, 6).Month = Range("Schedule!R5C45").Month Then
zp.Value = True
zp.Font.ColorIndex = 10
Else
zp.Value = False
End If
Next
Here though it is looking at cell AS5, which is the first of the month which is set by cell M1. So It can either look at AS5 or at M1, the answer (the month) will be the same in both those cells.
Anyone help?
Cheers