ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel user defined functioned (https://www.excelbanter.com/excel-worksheet-functions/181604-excel-user-defined-functioned.html)

[email protected]

Excel user defined functioned
 
I am trying to format a cell through user defined function. Code is
like.

ActiveCell.Font.Color = Red

but it is not working.
Is there any way to format a cell ( color, bold etc..)?

thanks

Billy Liddel

Excel user defined functioned
 
You can't format the result of a UDF only in a macro. Could you not use
Conditional Formatting based on the result of the UDF?

Peter

" wrote:

I am trying to format a cell through user defined function. Code is
like.

ActiveCell.Font.Color = Red

but it is not working.
Is there any way to format a cell ( color, bold etc..)?

thanks


ryguy7272

Excel user defined functioned
 
Not sure if this is what you are after, but it may get you closer...

Rng.Font.ColorIndex = 3

See this site for a list of colors:
http://www.mvps.org/dmcritchie/excel/colors.htm


Regards,
Ryan--

--
RyGuy


"Billy Liddel" wrote:

You can't format the result of a UDF only in a macro. Could you not use
Conditional Formatting based on the result of the UDF?

Peter

" wrote:

I am trying to format a cell through user defined function. Code is
like.

ActiveCell.Font.Color = Red

but it is not working.
Is there any way to format a cell ( color, bold etc..)?

thanks



All times are GMT +1. The time now is 01:35 AM.

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