ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HOW TO INSERT "CONDITION" IN DATES BY EXCEL (https://www.excelbanter.com/excel-programming/385399-how-insert-condition-dates-excel.html)

Excel

HOW TO INSERT "CONDITION" IN DATES BY EXCEL
 
I wanna insert a formula with dates in which I need 3 different colours. Eg.
until 30 days ago, the sentence has to be red, 31 to 45 days ago, the
sentence has to be yellow and before 45 days ago, e.i. 46 days ago or more,
the sentence has to be blue.
Thanks.
Alves

Fred Smith

HOW TO INSERT "CONDITION" IN DATES BY EXCEL
 
You want conditional formatting (FormatConditional Formatting...)

You can set up to three conditions, so you would use something like:

=today()-a1<=30 set color to red
etc.

--
Regards,
Fred


"Excel" wrote in message
...
I wanna insert a formula with dates in which I need 3 different colours. Eg.
until 30 days ago, the sentence has to be red, 31 to 45 days ago, the
sentence has to be yellow and before 45 days ago, e.i. 46 days ago or more,
the sentence has to be blue.
Thanks.
Alves




Martin Fishlock

HOW TO INSERT "CONDITION" IN DATES BY EXCEL
 
I would suggest using conditional formating and use a formula with three
conditions in this order if the date is in A1:

=$A$1<TODAY()-45 set fill color blue
=$A$1<TODAY()-30 set fill color yellow
=$A$1<=TODAY() set fill color red

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Excel" wrote:

I wanna insert a formula with dates in which I need 3 different colours. Eg.
until 30 days ago, the sentence has to be red, 31 to 45 days ago, the
sentence has to be yellow and before 45 days ago, e.i. 46 days ago or more,
the sentence has to be blue.
Thanks.
Alves



All times are GMT +1. The time now is 10:20 AM.

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