cell color based on value in other cell

ExcelNovice

Well-known Member
Joined
May 12, 2002
Messages
583
I need a macro to change the color of a cell based on the value in another cell.
I have data in range C4:L4. The user will review the content of the cells in the range, and may enter the letter Y or the letter N in C5 or D5 or E5 and so on.
If Y is entered in C5 I want the cell color for C4 to change to yellow, if N is entered the C4 cell color should change to orange, and the same for D5, E5 and so on.

Any help will be appreciated.

Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You can use conditional formatting to achieve what you want. One way ...

Select range C4:L4 \ Home Tab \ Conditional Formatting \ New Rule \ Use formula to determimine which cells to format \ use formula below \ apply required "YELLOW" colour format
=C5="Y"

Repeat for "ORANGE" \ use amended formula
=C5="N"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,881
Messages
6,122,074
Members
449,064
Latest member
MattDRT

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