VBA Code Help

Associate
Joined
25 Feb 2007
Posts
905
Location
Midlands
In Excel, I'm trying to insert a picture into any cell which meets certain requirements, in this case a background of Green and a cell value of > 0.

I'm struggling to tell my code to find any cells which match this criteria and use it as its range.

Can you help?
 
Cell.Interior.Color will give you the RGB value of the cells colour. You can compare it to your desired value or use the constants e.g. vbRed.

Cell.value will give you the value or the cell which you evalulate

Sheet.Pictures.Insert will allow you to add the picure, it will go to the currently selected cell.
 
Back
Top Bottom