ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Cell Background color Automatically (https://www.excelbanter.com/excel-programming/364429-change-cell-background-color-automatically.html)

dennis

Change Cell Background color Automatically
 
I have an Excel spreadsheet with 100 rows and 4 columns. The four columns
have percentage values in them. The question is this: I would like to write a
program that will compare the values in each rows corresponding columns and
turn the background color of the cell with the higher percentage value to a
desired color such as green. I have done very little VBA but should be able
to handle this simple task. Please include any code. I am very new at Excel.









Thanks

--
Dennis B

Bob Phillips

Change Cell Background color Automatically
 
You don't need VBA, conditional formatting will do it.

In CF, use a formula of

=A1=MAX(1:1)

For an intro to CF, see See http://www.contextures.com/xlCondFormat01.html

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Dennis" wrote in message
...
I have an Excel spreadsheet with 100 rows and 4 columns. The four columns
have percentage values in them. The question is this: I would like to

write a
program that will compare the values in each row's corresponding columns

and
turn the background color of the cell with the higher percentage value to

a
desired color such as green. I have done very little VBA but should be

able
to handle this simple task. Please include any code. I am very new at

Excel.









Thanks

--
Dennis B





All times are GMT +1. The time now is 07:42 AM.

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