Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I test a specific color in 2003?

I need to include a color test into If function.
Example:
If font text in cell A1 is green, then write "400"
(I have more colors to test than 2 so I can't use the CELL function)

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How do I test a specific color in 2003?

Try this UDF:

Function fontcolor(r As Range) As Integer
Application.Volatile
fontcolor = r.Font.ColorIndex
End Function

--
Gary''s Student - gsnu200776


"Sp3ct4tor" wrote:

I need to include a color test into If function.
Example:
If font text in cell A1 is green, then write "400"
(I have more colors to test than 2 so I can't use the CELL function)

Thanks in advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to test for a specific text string and write value to another Pyramid 36 Excel Worksheet Functions 2 August 3rd 07 12:55 AM
Excel 2003 :Summing specific cells of a particular color in a colu FLYNNE Excel Discussion (Misc queries) 2 August 18th 06 10:50 PM
If statement to test font color Gary Excel Discussion (Misc queries) 5 May 24th 06 09:09 PM
Logical Test comparison using cell color chamuko Excel Discussion (Misc queries) 2 November 9th 05 03:09 AM
Is there a way to test color formatting in countIF functions? Geni Excel Worksheet Functions 3 January 27th 05 03:31 PM


All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"