ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Formatting - Given dates within certain range of days (https://www.excelbanter.com/excel-worksheet-functions/448194-conditional-formatting-given-dates-within-certain-range-days.html)

Tee51

Conditional Formatting - Given dates within certain range of days
 
Hi,

Is there a way to highlight cells that have dates that are within 12 to 15 days and 30 to 35 days?

Example:
A1 = 2/7
A2 = 2/1
A3 = 1/19
A4 = 2/15

I would like cell a2 and a3 to be highlighted (preferably different colors).

Thanks in advance!

Kevin@Radstock

Hi Tee51

For the conditional formatting rules.
Assuming your data is column A:

Rule 1 Between 12-15 days from today:
=AND($A1<"",$A1=TODAY()+12,$A1<=TODAY()+15)

Rule 2 Between 30-35 days from today:
=AND($A1<"",$A1=TODAY()+30,$A1<=TODAY()+35)

Kevin

Quote:

Originally Posted by Tee51 (Post 1609401)
Hi,

Is there a way to highlight cells that have dates that are within 12 to 15 days and 30 to 35 days?

Example:
A1 = 2/7
A2 = 2/1
A3 = 1/19
A4 = 2/15

I would like cell a2 and a3 to be highlighted (preferably different colors).

Thanks in advance!


Tee51

Thanks.

I tried the formulas but neither worked? What if I wanted to do the entire column A? Would there be a difference in the formula?

Kevin@Radstock

Then you haven't entered the formulas correctly and they are for column A!
Put a selection of dates in column A starting from A1 and put one of the formulas in B1 and the other in C1, copy down and you will see FALSE or TRUE ( If it finds a date that meet the criteria)!

Conditional formatting for Excel 2007
Select column A or a range of cells in column A that you wish to apply the rules. Home Tab Conditional Formatting New Rule Use a formula to determine which cells to format Formula for Rule 1 goes into the box Format as required OK OK. Do the same for Rule 2.


Quote:

Originally Posted by Tee51 (Post 1609403)
Thanks.

I tried the formulas but neither worked? What if I wanted to do the entire column A? Would there be a difference in the formula?


Tee51

Sorry Kevin,

But this is not what I was trying to do. I would like column A to highlight instead of having additional columns show true or false. Also, the text is only coming back with false.

Thanks for your help. I'll take my time and figure something out.

Kevin@Radstock

1 Attachment(s)
Those additional columns are for example!!

I gave you the answer.
Conditional formatting for Excel 2007
Select column A or a range of cells in column A that you wish to apply the rules. Home Tab Conditional Formatting New Rule Use a formula to determine which cells to format Formula for Rule 1 goes into the box Format as required OK OK. Do the same for Rule 2.

Rule 1 Between 12-15 days from today:
=AND($A1<"",$A1=TODAY()+12,$A1<=TODAY()+15)

Rule 2 Between 30-35 days from today:
=AND($A1<"",$A1=TODAY()+30,$A1<=TODAY()+35)


Quote:

Originally Posted by Tee51 (Post 1609416)
Sorry Kevin,

But this is not what I was trying to do. I would like column A to highlight instead of having additional columns show true or false. Also, the text is only coming back with false.

Thanks for your help. I'll take my time and figure something out.


Tee51

Figured it out!

This is what I was looking for. Thanks for your assistance.

=AND($A1<"",$A1<=TODAY()-30,$A1=TODAY()-35)
=AND($A1<"",$A1<=TODAY()-12,$A1=TODAY()-15)


All times are GMT +1. The time now is 02:51 PM.

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