Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Identifying textcolor

Hi.
I have in a single column the letter S written and it is formatted in
different colors. I would like to identify the different colors.

If it is black just return B or what ever word, just something sop I can
separate them from each other.

Like an if formula only it searches for formatting instead of a value.

Kind regardas
Freddie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Identifying textcolor

Function txtclr(r As Range) As Integer
txtclr = r.Font.ColorIndex
End Function

This UDF will return the number corresponding to the font color.
--
Gary''s Student - gsnu200715


"FreddieP" wrote:

Hi.
I have in a single column the letter S written and it is formatted in
different colors. I would like to identify the different colors.

If it is black just return B or what ever word, just something sop I can
separate them from each other.

Like an if formula only it searches for formatting instead of a value.

Kind regardas
Freddie

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Identifying textcolor

Thank you, unfortunately I don't know where to put that text?

Could you also help me there?

I want it to return the color in another column. I don't know if that got
through the last time.

"Gary''s Student" wrote:

Function txtclr(r As Range) As Integer
txtclr = r.Font.ColorIndex
End Function

This UDF will return the number corresponding to the font color.
--
Gary''s Student - gsnu200715


"FreddieP" wrote:

Hi.
I have in a single column the letter S written and it is formatted in
different colors. I would like to identify the different colors.

If it is black just return B or what ever word, just something sop I can
separate them from each other.

Like an if formula only it searches for formatting instead of a value.

Kind regardas
Freddie

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Identifying textcolor

The three lines of text are a User Defined Function.

UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window


Using it is easy: Say your text is in cell A1. In another cell enter:

=txtclr(A1)

just like SUM or any other function. If the font color in A1 is default,
then -4105 is returned. If the font in A1 is red, then 3 is returned.


There is a different number for each of the 56 colors Excel can support at
one time.
--
Gary''s Student - gsnu200715


"FreddieP" wrote:

Thank you, unfortunately I don't know where to put that text?

Could you also help me there?

I want it to return the color in another column. I don't know if that got
through the last time.

"Gary''s Student" wrote:

Function txtclr(r As Range) As Integer
txtclr = r.Font.ColorIndex
End Function

This UDF will return the number corresponding to the font color.
--
Gary''s Student - gsnu200715


"FreddieP" wrote:

Hi.
I have in a single column the letter S written and it is formatted in
different colors. I would like to identify the different colors.

If it is black just return B or what ever word, just something sop I can
separate them from each other.

Like an if formula only it searches for formatting instead of a value.

Kind regardas
Freddie

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
Identifying Outliers Quco Excel Discussion (Misc queries) 13 February 14th 07 06:32 PM
Identifying famdamly Excel Discussion (Misc queries) 2 February 26th 06 06:44 AM
Have more textcolor/fill buttons available for different colors nelfen Excel Discussion (Misc queries) 1 December 16th 05 12:44 PM
vba, identifying a range Danny Excel Worksheet Functions 1 August 2nd 05 08:17 PM
Identifying links Andrew Excel Discussion (Misc queries) 2 June 30th 05 01:17 PM


All times are GMT +1. The time now is 05:27 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"