Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default How to give numbers to the font colors

Hi,

I have some data in A column. for Ex:
Column "A"
ABC - this is in red color font - For red color 1
DEF - this is in black color font - for Black color 2
GHI - this is in green color font - for Green color 3
JKL - this is in yellow color font - for Yellow color 4

Based on the color of the fonts I need to assign numbers like 1,2,3,4,.

Please let me know how can i proceed.

Thanks and regards,
Igneshwara reddy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How to give numbers to the font colors

If A1 contains colored values, then
=fontcolor(A1) will return the number of the font. The UDF is:

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

--
Gary''s Student - gsnu200739


"Igneshwara reddy" wrote:

Hi,

I have some data in A column. for Ex:
Column "A"
ABC - this is in red color font - For red color 1
DEF - this is in black color font - for Black color 2
GHI - this is in green color font - for Green color 3
JKL - this is in yellow color font - for Yellow color 4

Based on the color of the fonts I need to assign numbers like 1,2,3,4,.

Please let me know how can i proceed.

Thanks and regards,
Igneshwara reddy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How to give numbers to the font colors

The font colors already have a number which you cannot change so you might as
well use them.

Here is a partial list............

1 Black
2 White
3 Red
4 Bright Green
5 Blue
6 Yellow
7 Pink
8 Turquoise
9 Dark Red
10 Green
11 Dark Blue
12 Dark Yellow
13 Violet
14 Teal
15 Gray-25%
16 Gray-50%

See the Student's posting for a UDF to check the font colors you have.

For more on colors in Excel see David McRitchie's site.

http://www.mvps.org/dmcritchie/excel/colors.htm


Gord Dibben MS Excel MVP

On Thu, 23 Aug 2007 11:32:04 -0700, Igneshwara reddy
wrote:

Hi,

I have some data in A column. for Ex:
Column "A"
ABC - this is in red color font - For red color 1
DEF - this is in black color font - for Black color 2
GHI - this is in green color font - for Green color 3
JKL - this is in yellow color font - for Yellow color 4

Based on the color of the fonts I need to assign numbers like 1,2,3,4,.

Please let me know how can i proceed.

Thanks and regards,
Igneshwara reddy


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
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
font colors Jill Excel Discussion (Misc queries) 2 May 10th 07 07:17 PM
Reset should give a warning before resetting custom colors. ryders Setting up and Configuration of Excel 0 June 18th 06 01:10 AM
Font Colors Marcia Setting up and Configuration of Excel 1 March 5th 06 02:08 AM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM


All times are GMT +1. The time now is 07:32 AM.

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"