It's probably pretty easy question, but I am not familiar with the syntax of VBA, so I need some help.
I would like to have a function called vcolor(), where it uses a number to determine a cell's color.
If the number is <= 30, it's red. 'cell.Interior.ColorIndex = 3'
If the number is >30 and <= 80 it's yellow. 'cell.Interior.ColorIndex = 7'
If the number is >80, it's green. 'cell.Interior.ColorIndex = 4'
I would like it to return the same number, and simply change the cell's color.
Use the above strings to change the color (I believe that's correct), I just don't know how to add them into it correctly due to syntax, thanks.
Bookmarks