G
Guest
I have a pivot table that is aproximately 100 rows by 52 columns. The column
headings are dates, and the row headings also contain dates. I am trying to
write a macro that does 2 things.
1. Verify if there is data in the cell.
2. If there is data, and the data at the top of the column is greater than
the date of the row, I want to fill the cell in red.
I have tried:
For r=1 to 100
For c = 1 to 52
IF Activecell.value.isblank=true then Next r
Elseif Activecell.value (R, C[-c]) > Activecell.value(R[-r], C) Then
With Selection.Interior
.ColorIndex = 7
.Pattern = xlSolid
End With
Next R
Next C
I am having trouble with the syntax of the if statements. Any assitance
would be greatly appreciated.
JC
headings are dates, and the row headings also contain dates. I am trying to
write a macro that does 2 things.
1. Verify if there is data in the cell.
2. If there is data, and the data at the top of the column is greater than
the date of the row, I want to fill the cell in red.
I have tried:
For r=1 to 100
For c = 1 to 52
IF Activecell.value.isblank=true then Next r
Elseif Activecell.value (R, C[-c]) > Activecell.value(R[-r], C) Then
With Selection.Interior
.ColorIndex = 7
.Pattern = xlSolid
End With
Next R
Next C
I am having trouble with the syntax of the if statements. Any assitance
would be greatly appreciated.
JC