excel - Put a fill color in a specific cell -


my program loops through each row of data in sheet. when errors, want put fill color on specific cell.

is there way put fill color in cell without using range?

 on error goto stop    'doing   exit sub stop: msgbox("error!")  'something fill cell sheets("data").cells(rowdata,1).color = red 

you can this

cells(rowindex, columnindex).interior.color = rgb-code  cells(rowindex, columnindex).interior.colorindex = indexno 

Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -