Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 287
Default Column that needs separation

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Column that needs separation

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default Column that needs separation

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
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
Mean separation by LSD value Peggy Excel Worksheet Functions 2 July 18th 08 12:25 PM
name separation Help with Cell question Excel Worksheet Functions 3 July 9th 08 08:35 PM
Value separation and then adding Walt Moeller Excel Worksheet Functions 2 March 4th 08 04:59 PM
Decimals separation "." and "," giovdett Excel Worksheet Functions 1 March 30th 05 11:03 AM
Decimals separation by . or , giovdett Excel Discussion (Misc queries) 0 March 30th 05 07:54 AM


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