![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
How do I get a column of dates to turn red if they are more than 3 days older than the current date? I'm sure I've seen the answer to this somewhere on here before but I cant seem to find it |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Activate Format|Conditional Formatting. Choose 'Formula Is' for 'Condition 1'. Enter in the formula box: =A1+3<=TODAY() Activate Format. Select red on the Patterns tab. Click OK, OK. [ This Message was edited by: Aladin Akyurek on 2002-03-26 01:41 ] |
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Pankman
You will need to use =A1=TODAY()+3 Or =A1=TODAY()-3 Depending on your need. If you just use: =A1<=TODAY() All dates, equal to or less that the current date will be red. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
Thanks for the replies, but they didn't seem to work. You see, I have a userform that people fill in, and one of the fields is date, formatted as "dd mmmm yyyy". When they click the command button at the end, the information goes into a sheet of the workbook. Now this info builds up and builds up, so what I need to do is earmark the ones that are older than others, so if the date in the date field is 3 days old or more, then I want it to go red. Would any of this be helpful in figuring out why it didn't work?
|
|
|
|
|
|
#5 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
You are probably entering the dates as Text.
Use: Range("A1")=Textbox1.Value Just ensure your cells are pre-formatted as the date format you want. |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
Hi Aladin, the formula looks great except that I need the formatting to be for the whole of column A, not just A1. How would I do this?
|
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Aladin |
|
|
|
|
|
|
#9 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
Aladin, that is absolutely perfect!! Thank you
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|