ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I need a macro that will change the color of a cell #1 when a Y o. (https://www.excelbanter.com/excel-programming/309221-re-i-need-macro-will-change-color-cell-1-when-y-o.html)

Jack Schitt

I need a macro that will change the color of a cell #1 when a Y o.
 
Any reason why you want to do this by a Macro?

My first instinct would be to use conditional formatting (Format/Conditional
Formatting .. from the menu bar) on cell #1, wherein condition 1 would be
set to
=cell2_ref="Y"
(substitute actual cell2_ref or name of that cell as appropriate)
and set the foreground and background colours as desired by clicking on
Format button in the conditional format dialog box.

"David Campbell" <David wrote in message
...
I need a Macro in Excel that will change the color of cell #1 when a Y or

N
is entered into cell #2.





All times are GMT +1. The time now is 07:37 PM.

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