get conditional formatted color with vba in excel

本秂侑毒 提交于 2020-06-18 13:21:13

问题


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:


You can use:

DisplayFormat.Interior.Color

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



来源:https://stackoverflow.com/questions/47419269/get-conditional-formatted-color-with-vba-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!