Hi I'm looking for some advice on simplifying some code so it's much easier to read alter in the future.

I think a For Each statement is what i want to use. But I have little experience useing the For Each statement.

Here is a brief of what I'm trying to do.

My excel sheet display details for printers, some use just a black ink, some black and colour, some with extra colours, the sign displays the ink cartridge number, the yield and price of ink. It's displayed like a table.

So the cells get coloured in with black magenta cyan and yellow with the cartridge number in the cell. as well as displaying cell boarders if the cell has text or no boarders and no fill for the printers that don't use those colours.

At the moment I'm useing if then else statements, but they are extreamly long and there are 7 in total each with about 20 lines of code for all the boarders colour fill, and else statements being the opposite, no fill no boarders.

I'd like to use a For Each statement, something like

For Each cell in Range ("h45:h51") (where the cell.value is = 0)
Interior.colour = RGB (255,255,255)
plus the boarder formatting
next cell

I know iv been rather short with the code here, and don't worry I can read VBA I'm just typing on my phone so I'm just being rather basic.

I did find some code that used the For Each statement, and then used the xlspecialcellsblank to set fill but it also filled the cells that were not blank.

If you know what I'm on about then do reply if you would like more info, the next time I'm at my PC I can post some example code.

I should also note that my cells are not directly filled with a value, they reference a cell on another sheet.

Hope i have not been to vague.

Cheers folks