LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
jc jc is offline
external usenet poster
 
Posts: 164
Default Multiple If Statements

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple IF Statements Steve Excel Worksheet Functions 1 December 14th 07 01:57 PM
Multiple IF statements looking up multiple ranges. mike Excel Worksheet Functions 7 August 9th 07 04:55 PM
Multiple if statements with multiple conditions egarcia Excel Discussion (Misc queries) 4 January 29th 07 10:46 PM
multiple if statements ddepasquale Excel Worksheet Functions 3 August 5th 05 09:55 PM
Multiple VBA IF/Then Statements Emm100[_3_] Excel Programming 4 July 1st 05 03:54 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"