ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   conditional formatting - compare 2 dates (https://www.excelbanter.com/excel-discussion-misc-queries/27326-conditional-formatting-compare-2-dates.html)

Dan

conditional formatting - compare 2 dates
 
I would like to use conditional formatting to highlight cells. Here is the
scenerio .. a cell has a date that is calculated from a formula. If that
date falls within the next 7 days i would like the cell to change colors. I
for the life of me can not figure out the correct formula to put into the
conditional formatting box.

Thanks in advance.

JE McGimpsey

One way:

With A1 selected:

CF1: Formula is =AND(A1=TODAY(), A1-TODAY()<=7)

In article ,
Dan wrote:

I would like to use conditional formatting to highlight cells. Here is the
scenerio .. a cell has a date that is calculated from a formula. If that
date falls within the next 7 days i would like the cell to change colors. I
for the life of me can not figure out the correct formula to put into the
conditional formatting box.

Thanks in advance.


Bob Phillips

Assuming that the dates start in A!, select all the cells and use this
formula

=AND(A1=TODAY(),A1<TODAY()+7)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dan" wrote in message
...
I would like to use conditional formatting to highlight cells. Here is

the
scenerio .. a cell has a date that is calculated from a formula. If that
date falls within the next 7 days i would like the cell to change colors.

I
for the life of me can not figure out the correct formula to put into the
conditional formatting box.

Thanks in advance.





All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com