Formula to determine Cell Color Format (Shading)

  • Thread starter Thread starter Kimberly Jaeger
  • Start date Start date
K

Kimberly Jaeger

I was wondering if there is any formula or macro to use
to evaluate cells that contain a certain format.
I want to create a Yes/No column for when cells are
formatted with a color so that I can sort a large amount
of data based on the color the cell is shaded.
Ideas appreciated.
I don't want to do find>all by format that is available
on the Finder menu because I cannot populate the other
column based on that and I want to be able to frequently
evaluate only rows of data contain the cells colored a
certain way.
 
you can use a macro that will analyze the color like:

if sheets("sheet1").cell(1,1).interior.colorindex=5
then cell(1,2)="YES"

or something similar

good luck
 
You also can write a function in VBA. I used the Interior format but you can use to anyone.

Take a look :

Function chk_Interior(wrk_cell)
' For example : the cell that will be
' evaluate is in Column C
' =chk_Interior(C8)

'Use this function in a column to each cell
' that you want to evaluate
If wrk_cell.Interior.ColorIndex = 5 Then
' If there´s a pattern color (blue -> 5)
' then will appear True in the cell
chk_Interior = "True"
Else
chk_Interior = ""
End If
End Function
 
Back
Top