ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   What is the macro to change background based on numeric cell value (https://www.excelbanter.com/excel-worksheet-functions/95265-what-macro-change-background-based-numeric-cell-value.html)

Still learning

What is the macro to change background based on numeric cell value
 
I want that a cell background color will change upon calculating a value.

That is to say, if the calculated value is greater than 1.2, then the
background color of that cell will change to red. Conversely, if the
calculated value is less than 4.0, then the background color of that cell
will change to yellow.

The colors which I want to utilize are red, green and yellow.

Thank you in advance for your assistance.

Marcelo

What is the macro to change background based on numeric cell value
 
Hi why do not use a conditional format?

HTH
regards from Brazil
Marcelo

"Still learning" escreveu:

I want that a cell background color will change upon calculating a value.

That is to say, if the calculated value is greater than 1.2, then the
background color of that cell will change to red. Conversely, if the
calculated value is less than 4.0, then the background color of that cell
will change to yellow.

The colors which I want to utilize are red, green and yellow.

Thank you in advance for your assistance.


Ken Hudson

What is the macro to change background based on numeric cell value
 
Hi,

Go to Format Conditional Formatting... and set your formats for the first
case.
Then click on the Add button and set the conditions for the next and again
for the third case.
--
Ken Hudson


"Still learning" wrote:

I want that a cell background color will change upon calculating a value.

That is to say, if the calculated value is greater than 1.2, then the
background color of that cell will change to red. Conversely, if the
calculated value is less than 4.0, then the background color of that cell
will change to yellow.

The colors which I want to utilize are red, green and yellow.

Thank you in advance for your assistance.



All times are GMT +1. The time now is 10:25 PM.

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