ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need a way to set value based on fill color of a cell (https://www.excelbanter.com/excel-programming/345557-need-way-set-value-based-fill-color-cell.html)

banderson

need a way to set value based on fill color of a cell
 
I am looking to set a numerical value of one cell based on the fill color of
another cell. Thanks


Tom Ogilvy

need a way to set value based on fill color of a cell
 
in a macro?

if the fill color is the actuall background color and not produced by
conditional formatting

select Case Range("A1").Interior.ColorIndex
case xlNone
c = 6
case 3
c = 12
case 5
c=21
End Select
Range("B9").Value = c


--
Regards,
Tom Ogilvy

"banderson" wrote in message
...
I am looking to set a numerical value of one cell based on the fill color

of
another cell. Thanks





All times are GMT +1. The time now is 05:11 AM.

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