get conditional formatted color with vba in excel

3.2k views Asked by At

Working: An excel bubble chart, with circles in different sizes and colors.

Not Working: I get the colors by reading the color value with vba, however Interior.Color does not recognise the color set by conditional formatting.

Code in question:

Range("Z" & Application.WorksheetFunction.Match(srs.Name, Sheets("Diagrammdaten").Range("a:a"), 0)).Interior.Color

I can't find anything on a different selector than Interior.Color, but there surely has to be something like Displayed.Color in excel?

Thanks for your help.

1

There are 1 answers

0
Tim Williams On BEST ANSWER

You can use:

DisplayFormat.Interior.Color

to get the cell color. Other CF properties are also accessible via DisplayFormat