Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Identifying Outliers | Excel Discussion (Misc queries) | |||
Identifying | Excel Discussion (Misc queries) | |||
Have more textcolor/fill buttons available for different colors | Excel Discussion (Misc queries) | |||
vba, identifying a range | Excel Worksheet Functions | |||
Identifying links | Excel Discussion (Misc queries) |