ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel formulas based upon the color shading of a cell? (https://www.excelbanter.com/excel-worksheet-functions/21712-excel-formulas-based-upon-color-shading-cell.html)

DGBG

Excel formulas based upon the color shading of a cell?
 
Is there a way to execute a formula in Excel that references the current
color shading of a cell so that I can place a value in a corresponding cell?

Example:

If cell A1 is shaded green the cell A10=8

Ramakrishnan Rajamani

Try this. Might work

If Range("A1").Interior.ColorIndex = 4 Then
Range("A10").Value = 8
ElseIf Range("A1").Interior.ColorIndex = 5 Then
Range("A10").Value = 10
ElseIf Range("A1").Interior.ColorIndex = 6 Then
Range("A10").Value = 12
Else
-- -- -- -- --
End If


"DGBG" wrote:

Is there a way to execute a formula in Excel that references the current
color shading of a cell so that I can place a value in a corresponding cell?

Example:

If cell A1 is shaded green the cell A10=8



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

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