View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie
 
Posts: n/a
Default how do I change the fill collor os a cell using a function in VB

see Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"BekkiM" wrote...
Why not just use conditional formatting? You can set up essentially the same
If/then conditions and get your fill color that way.

"Jason R Morris" wrote:
I am trying to us an if then statment in a function to change the fill color
of a cell if the conditions are true. I have tried
"ActiveCell.Interior.ColorIndex = 6" that works in subs, but it does not
works in functions.