From: Aaron on 19 May 2010 20:36 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
From: Gary''s Student on 19 May 2010 21:00 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
From: ozgrid.com on 19 May 2010 21:05 If only 2 primary names use Conditional Formatting. http://www.ozgrid.com/Excel/conditional-formatting.htm -- Regards Dave Hawley www.ozgrid.com "Aaron" <Aaron(a)discussions.microsoft.com> wrote in message news:DB7E28CE-5E55-4F15-AE95-D04F4B59DFD2(a)microsoft.com... >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
|
Pages: 1 Prev: Can I have a list of reserved words in excel column name? Next: Need help on a formula |