Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am very new with excel and I am putting together a worksheet that has a
column consisting of two primary names. I would like to format the entire column with the result being both names having their own color throughout the column. Alternatively, I could go to each row and highlight the name but there are about 1000 rows. Thanks, Aaron |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Say column A has entries like:
James Ravenswood Run this small macro: Sub Colorizer() Dim A As Range, r As Range Set A = Intersect(ActiveSheet.UsedRange, Range("A:A")) For Each r In A v = r.Value s = Split(v, " ") L1 = Len(s(0)) L2 = Len(s(1)) S1 = 1 S2 = L1 + 2 r.Characters(Start:=S1, Length:=L1).Font.ColorIndex = 3 r.Characters(Start:=S2, Length:=L2).Font.ColorIndex = 6 Next End Sub will result in James colored red and Ravenswood colored yellow. Macros 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 If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To use the macro from Excel: 1. ALT-F8 2. Select the macro 3. Touch RUN To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary''s Student - gsnu201003 "Aaron" wrote: I am very new with excel and I am putting together a worksheet that has a column consisting of two primary names. I would like to format the entire column with the result being both names having their own color throughout the column. Alternatively, I could go to each row and highlight the name but there are about 1000 rows. Thanks, Aaron |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If only 2 primary names use Conditional Formatting.
http://www.ozgrid.com/Excel/conditional-formatting.htm -- Regards Dave Hawley www.ozgrid.com "Aaron" wrote in message ... I am very new with excel and I am putting together a worksheet that has a column consisting of two primary names. I would like to format the entire column with the result being both names having their own color throughout the column. Alternatively, I could go to each row and highlight the name but there are about 1000 rows. Thanks, Aaron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mean separation by LSD value | Excel Worksheet Functions | |||
name separation | Excel Worksheet Functions | |||
Value separation and then adding | Excel Worksheet Functions | |||
Decimals separation "." and "," | Excel Worksheet Functions | |||
Decimals separation by . or , | Excel Discussion (Misc queries) |