![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Mar 2004
Posts: 2
|
Hi
Can someone help me please, im pretty new to Excel and am having my first attempt at conditional formatting. I have created a spread sheet which has a column of dates. I need the sheet to highlight todays date in red so I have: =INT(G5)=TODAY() I then need it to flag up dates in yellow up to 31 days ahead of todays date: =AND(INT(G5)>TODAY(),(INT(G5)-TODAY())<31) My problem is that I also need it to flag up dates prior to today, i.e. overdue dates in another colour. So what test do I need to put in for condition 3. Any help gratefully received |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: May 2003
Posts: 8,456
|
Welcome!
How about: =INT(G5) < TODAY()
__________________
"Fair Winds and Following Seas" |
|
|
|
|
|
#3 |
|
Join Date: Aug 2003
Location: England
Posts: 4,584
|
Hello and welcome to the board,
The three conditional formats you require are as follows: CONDITION 1 Cell Value is equal to =TODAY() CONDITION 2 Cell Value is less than = TODAY() CONDITION 3 Cell Value is between =TODAY() =TODAY()+31 Select formats as required. Use the format painter to format the other cells/column. Is should be obvious into which INPUT BOXES the data goes in, any problems/queries let me know.
__________________
------------------------- Hope this is helpful. ------------------------- only a drafter, but broadening my Excel knowledge. |
|
|
|
|
|
#4 |
|
Join Date: Nov 2002
Location: Cornwall UK
Posts: 589
|
Debbie,
As Fairwind has shown, that will give you the answer you require and I offer the following formulae for you to experiment with. You can do it without formulae by using cell value. EDIT (as shown above) If G5 is one of the dates in your column (formatted as a date format) that you wish to apply conditional formatting to then there is no need for the INT part of your formulae and they can be rewritten as shown below: Code:
=G5
__________________
Never too old to learn... |
|
|
|
|
|
#5 |
|
Join Date: Mar 2004
Posts: 2
|
Thank you all so much for your help I can stop tearing my hair out now
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 39,503
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|