Help with using a cell in function

M

mario

What is the function or statement that will return the font color of the
adjacent cell.

For example:

AdjCellFontColor(B2) will return the font color of A2.

Thanks
 
W

William

Hi Mario

Place this in a general module

Function FontColor(c As Range)
Application.Volatile
FontColor = c.Font.ColorIndex
End Function

To return the font color of a cell on your spreadsheet, enter in any cell
the formula..
=FontColor(A1)
where A1 is the cell whose font color you wish to return.

--
-----
XL2003
Regards

William
[email protected]
 
M

mario

Hi william.,

I want a funtion for e.g FontColor(B3) will return the font color of A3.

Pls Help.

thanks
 
G

Gord Dibben

mario

Using William's UDF...........

=FontColor(OFFSET(B3,0,-1)) entered in any cell will return font color of A3


Gord Dibben Excel MVP
 
Top