Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Excel VB If functions and cell formatting

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
hulks



Joined: 08 May 2009
Posts: 1

PostPosted: Fri May 08, 2009 5:40 am    Post subject: Excel VB If functions and cell formatting Reply with quote

Hi,
I am fairly new to VB and am struggling (big time!)

I have a spreadsheet (Sheet1).

Column H is a column for dates. Not all cells currently have an entry but at some point in the future they will.
Column J is also a column for dates.

I would like to apply the following conditional formatting to the cells H8 to H188 BUT ONLY if the corrsponding cell in column J has a date entered

Between 1 and NOW() background color RED
between NOW() and NOW()+30days background color ORANGE
between NOW()+30days and NOW()+60days background color GREEN
greater than NOW()+60 BLUE

For example take cells H8 and J8

Todays date is 08/05/09
Cell H8 = 17/05/09
Cell J8 = 18/06/09

This should mean cell H8 has background color ORANGE however, if the date in cell J8 was removed cell H8 should not have any backgroudn color

Hope this isn't too confusing and I would be so, so greatful if anyone can assist??

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group