Conditional formating

Anon125
StarLounger
Posts: 60
Joined: 12 Jan 2025, 23:05

Conditional formating

Post by Anon125 »

I can change the color of the text if it is before 7am.
How do I do this if the next column is before 7am, make this column red.
The first column is a date.
I still use excel 2003 which makes xls files.
Thanks for your help

Dp24 on this forum answered a conditional formatting question

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional formating

Post by HansV »

Welcome to Eileen's Lounge!

Let's say you want to color C2:C100 if the corresponding cell in D2:D100 is before 7AM.
Select C2:C100. C2 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula

=$D2<TIME(7,0,0)

Click Format...
Activate the Fill tab.
Select a fill color.
Click OK, then click OK again.
Best wishes,
Hans

Anon125
StarLounger
Posts: 60
Joined: 12 Jan 2025, 23:05

Re: Conditional formating

Post by Anon125 »

Thanks
Let's see if that works in my older version

How do I set this forum to send me an email when a kind person helps?

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional formating

Post by HansV »

In Excel 2003, select Format > Conditional Formatting...

To get notifications, go to Notification Options and tick the check boxes under EMAIL for the types you want to receive by email.
Warning: our notification system is far from perfect, sometimes the server fails to send notifications.
And check your spam folder.
Best wishes,
Hans

Anon125
StarLounger
Posts: 60
Joined: 12 Jan 2025, 23:05

Re: Conditional formating

Post by Anon125 »

Warning: our notification system is far from perfect, sometimes the server fails to send notifications.
thanks HansV

Anon125
StarLounger
Posts: 60
Joined: 12 Jan 2025, 23:05

Re: Conditional formating

Post by Anon125 »

Your formula worked very well.
can it be if time is between 4am and 7am?
thanks for your great help

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional formating

Post by HansV »

Change the formula to

=AND($D2>=TIME(4,0,0), $D2<TIME(7,0,0))
Best wishes,
Hans

Anon125
StarLounger
Posts: 60
Joined: 12 Jan 2025, 23:05

Re: Conditional formating

Post by Anon125 »

Great, thanks
Glad I joined your forum!

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional formating

Post by HansV »

Feel free to come back if you have more questions!
Best wishes,
Hans