This should be easy to do, but I can't figure it out. I have a range of cells that are using the stop light icons for conditional formatting. I want to loop through this range and act based on whether the icon is red, green, ye开发者_如何学JAVAllow, but I can't figure out how to simply read which stoplight has been applied to the current cell.
To my knowledge it is not possible to get the "state" or result of the conditional formating. Best you can do is rebuilding the condition in your code and working on this. Maybe just add a column/row to your workbook which recreates the condition and work on that value? You could hide the column/row or even place it on another worksheet. It all depends on your table setup/layout.
精彩评论