changing color of a cell based on logical return

thexfactor44

New Member
Joined
Feb 21, 2002
Messages
26
I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
4/15/02 (for example)
After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

thanks for all responses.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Highlight your range and se conditional formatting under the format menu.

set condition one to cell value is equal to and then type in =today()-1. Then select whatever format you want to apply to yesterday's date.
 
Upvote 0
On 2002-05-02 13:45, thexfactor44 wrote:
I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
4/15/02 (for example)
After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

thanks for all responses.

Select relevant range of dates and apply conditional formatting with Formula is where you enter:

=TODAY()-E1=1

and select a format.

E1 is the first cell of the range. Adjust to suit.
 
Upvote 0
On 2002-05-02 13:45, thexfactor44 wrote:
I need to change the text color in a given cell if it contains yesterday's date. The date is entered in the following format (if it matters):
4/15/02 (for example)
After the next day, all the previous cells that were yesterday's date will be two days ago and I need them to go back to normal black...and the new dates that qualify as yesterday should highlight text. What can I do?

thanks for all responses.

Lets assume column A holds the dates in your spreadsheet and Cell A1 holds todays date.

Lets say the Text is in Column B and you want to put on a Red fort to yesterdays Text.

select the whole Column B

Call up Format - Conditional Formating

Change 1st box in Condtion 1 to Formula is

In 2nd box enter the formula

=A1=$A$1-1

Click format button change font to bold and red

click OK

That should do the trick


<MARQUEE/> :cool: Hope This Helps :cool: </MARQUEE>
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top