View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Change Cell properties by Function

The colorindex can not be changed by a function alone. You would need an
event macro to operate in conjunction with the function.
--
Gary's Student


"Gilles P (FR)" wrote:

Hello,

I like to change the colorIndex of a cell by a function is it possible ?
The code following doesn't works:

Function Fncolor(Value)
Worksheets("Sheet").Cells(RowNbr, ColumnNbr).Font.ColorIndex = 3
Fncouleur = "nnnnnn"
End Function

With a cell containing '=Fncolor(5)' to call the function

The goal is to avoid Format / condition limitation to 3 conditions....
Thanks for your Help

Gilles P(FR)