ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help with using a cell in function (https://www.excelbanter.com/excel-worksheet-functions/23291-help-using-cell-function.html)

mario

Help with using a cell in function
 
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

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



"mario" wrote in message
...
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




mario

Hi william.,

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

Pls Help.

thanks

"William" wrote:

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



"mario" wrote in message
...
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





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


On Fri, 22 Apr 2005 18:48:03 -0700, "mario"
wrote:

Hi william.,

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

Pls Help.

thanks

"William" wrote:

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



"mario" wrote in message
...
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







All times are GMT +1. The time now is 01:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com