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
0
Utf
5/20/2010 12:36:01 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
743 Views

Similar Articles

[PageSpeed] 9

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
0
Utf
5/20/2010 1:00:01 AM
If only 2 primary names use Conditional Formatting.
http://www.ozgrid.com/Excel/conditional-formatting.htm





-- 
Regards
Dave Hawley
www.ozgrid.com
"Aaron" <Aaron@discussions.microsoft.com> wrote in message 
news:DB7E28CE-5E55-4F15-AE95-D04F4B59DFD2@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 

0
ozgrid
5/20/2010 1:05:54 AM
Reply:

Similar Artilces:

Identity Column in SQL Server View
Access 2007 front end with SQL Server 2005 Express back end. Using SQL Server Profiler, I have observed the following: When an Access datasheet form is bound to a table (or view containing one table), with an Identity (Access Autonumber) column, and a new record is inserted via the bound form, Access uses sp_executesql to insert the new values into the table (or view). If I look at design view of the table (or view) in Access, the identity column appears as an autonumber. Since Access recognizes the Identity (Autonumber) column, it uses SELECT @@Identity to retrieve the new i...

Need to make a .PST from Exchange 2003
Hello all - I've used exmerge.exe to pull out a .pst file. However, the .pst file is over 2GB (it's 2.3gb) so I can't get it to open in Outlook 2003. I used the PST2GB.EXE to pare the file size down to 2GB, but when I go to open it, I get an error. So, then I run "scanpst.exe" on it, and let it finish. Afterwards, I go to open the .pst file, and there there's no "Inbox", "Sent Items", etc in Outlook2003. ... Instead, all I see are "Recovered Folder 8082" and "Recovered Folder 80C2". Basically, I need to create a PST f...

add a colum within 5 spaces of a column
i would like to insert a colum within 5 rows of a column. how do i do this? thank you. You can't split cells. However, you could merge two columns for all cells except your 5 rows (i.e., select columns B & C, merge them, select your (now) 5 cells, and unmerge them). However, merging is the spawn of the devil. It leads to problems with sorting, formatting, copy/paste, etc. In article <B844F382-3A5E-4EFB-810D-15BB840C5228@microsoft.com>, "Bruce" <Bruce@discussions.microsoft.com> wrote: > i would like to insert a colum within 5 rows of a column. > how d...

Copying from columns to Rows
Can anyone tell me if there is a way of copying a series of rows of cells in excel and pasting them as a whole to a series of columns? I don't know if this can be done? -- scottsman78 ------------------------------------------------------------------------ scottsman78's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27789 View this thread: http://www.excelforum.com/showthread.php?threadid=472968 Hi Scottsman78, > Can anyone tell me if there is a way of copying a series of rows of > cells in excel and pasting them as a whole to a series of columns? ...

need help please
I am creating an html newsletter to email. This will be a template that will be sent to someone else who will open it outlook express through messaging\new message using. They will copy and paste text from word into the file. I want to create links at the top (news headlines) that link down the page to the story. They will create a different newsletter every week. In HTML I have used anchors to do this. For this job I need to do it in word. In word I have tried creating a hyperlink to headline and also cross-referenced to a bookmark. The hyperlink apears when the email is sent but...

Need to filter by month
Hello, I'm trying to analyze my monthly spending and type of spending. I have a spreadsheet with a column for date, the amount spent and the type of spending, but I'm unable to find a function which can filter each type of spending by month. I've tried the sumif function, but this function does not allow me to sum cells corresponding to other cells WITHIN a certain time period. Instead it only allows me to sum cells corresponding to other cells greater than, less than, or equal to a certain date. I've also tried the conditional summer to build my own function, but I...

Average of numbers in column between to other numbers
If i have a big column of numbers, and i would want to select that column and find the averages of all the numbers in that column that are between 0 and 500, how would i type that formula? Thanks! One way =AVERAGE(IF((A1:A2000>0)*(A1:A2000<500),A1:A2000)) entered with ctrl + shift & enter -- Regards, Peo Sjoblom "Ditandhischeese" <Ditandhischeese@discussions.microsoft.com> wrote in message news:07E82578-9125-4C99-90D2-A4F159FBAE13@microsoft.com... > If i have a big column of numbers, and i would want to select that column > and > find the averages...

Formula Bar
In my previous copy of Excel, when I typed in an equation in the Formula Bar, it would give me a little message window that showed where I was in a particular equation. Now that I have a another copy, I don't know what the "on" switch is for this function. Please help, it's driving me crazy when I create very long equations. Thanks, AK AK it was introduced with excel 2002, you turn it on/off under tools>options>general>function tooltips -- Regards, Peo Sjoblom "ak" <anonymous@discussions.microsoft.com> wrote in message news:BB2440A2-2883-4...

I Need to create a criteria from a combo box that is on a datashee
Hi. I have a form in datasheet view. there's a combo named Hardwaretype and another one named hardwarename there's a relationship with this join type: one hardware type has many hardwarename. In a line of that datasheet view form if I choose monitors in hardwaretype comobox I want that in hardwarename combo only appeares the hardware that belongs to monitors, such as CRT; LCD. If the next line I choose Printers on hardwaretype and that the hardwarename combobox only shows me the hardware that belongs to prints. It's a criteria of what is choosed on hardwaretype. Is it po...

Last Exchange 5.5 Server is site....need to delete server and site
We had an Exchange 5.5 server that was the last server in an administrative site that was improperly removed from our Exchange 5.5 Organization. As it stands now, this site and server still exist within the Exchange 5.5 Org however in reality do not exist. How can I delete this server and Site from my Exchange 5.5 Org? Is this something that can be done in raw mode? Thanks! As long as the old server does not exist or is not on-line you can go into the System Administrator in RAW mode and delete the server. I hope that helps Hi Robert, Thanks for your response. Actually, I am n...

Removing Text but Not Numbers in a Column
Hello I have a spreadsheet the has columns for phone numbers in it. The Phone numbers have been entered manually and have all differen formats such as (555)123-1234 or 555-123-1234 I need to delete all of the text so that just the numbers are left s it looks like 5551231234, so I can upload the column into my cel phone. Would there be an easy way of doing this with out manuall changing each entry I have over 2500 phone numbers I have to do thi to. I try the Format Painter, and Formatting the Cells but it didn't wor for me. I am running Microsoft Office For OS X, and any help would ...

How do I change column widths within idividual tables on the same.
I'm using xl 2000. I want to place several tables on the same worksheet. Is it possible to change column widths of a table without affecting the column width of the other tables. Hi! If the tables are one on top of the other, no. Both column width and row height are constant for the entire column or row. A possible workaround would be to merge cells but that has disadvantages. Biff >-----Original Message----- >I'm using xl 2000. I want to place several tables on the same worksheet. Is >it possible to change column widths of a table without affecting the column...

Amendment need to Macro !
Amendment need to Macro ! This macro copies a cell down every 72 cells till 5112, Is it possible to have a Macro copy a selection of cells down the same after highlighting them? Public Sub CopySelectionEvery72UntilRow5112() Dim i As Long Dim destRng As Range With Selection(1) Set destRng = .Cells For i = .Row + 72 To 5112 Step 72 Set destRng = Union(destRng, Cells(i, .Column)) Next i .Copy destRng End With End Sub -- Thanks in advance for your help....Bob Vance .. .. .. .. Bob, Just remo...

Pasting CSV list into separate cells...
If I paste it into excel the entire text string goes into one cell. I would like to be able to paste and then have excel recognize it is a CSV list and put each value in its own cell. I've tried "paste special" but could not see how to do it. Can this be done? Thanks! Hi once you've pasted it click on the cell and use data / text to columns option on the first screen choose delimited and then on the next choose comma. Cheers JulieD "jmboggiano" <jmboggiano@discussions.microsoft.com> wrote in message news:75AF77CE-80B5-44F6-94EE-8E14E0FEE0B4@micro...

Adding and subtracting from either column with tax or column without tax?
1) I still can't wrap my brain around the problem of Add this to the column WITH this or to the column WITHOUT this. In this case, one column has the invoice amount billed with tax and the other column will have it without tax. In other words, column C is the amount billed WITH a 6% tax we have in Canada, and column D is WITHOUT that tax. Column E is the total amount billed to date which would take either the C column's value for that row or the D column, whichever is filled. It's how to deal with the formula in column E that is my problem. -------------- As a specific exampl...

Need help communicating with device on COM1
Does anyone have any sample code for controlling a device attached to a COM port of a Win2K/XP machine? The modem code I have is from 1992 and doesn't seem to work very well. Thanks. -Bob Bob Phillips wrote: > Does anyone have any sample code for controlling a device attached to a COM > port of a Win2K/XP machine? The modem code I have is from 1992 and doesn't > seem to work very well. > Thanks. > -Bob > > This code was hacked out of a prototype terminal emulator I this any use? HANDLE m_hFile ; m_hFile = (CreateFile(_T("COM1:"), GENERIC_READ |...

Windows XP Update problem help needed-
Am running Operating System : Microsoft Windows XP Home Edition Version : 5.01.2600 Service Pack 3 Problem is that when I go to the Windows update site it shows the following updates available: Microsoft .NET Framework 3.5 SP1 Update for Windows Server 2003 and Windows XP x86 (KB982168) Microsoft .NET Framework 3.5 SP1 and .NET Framework 2.0 SP2 Security Update for Windows 2000, Windows Server 2003, and Windows XP x86 (KB979909) I tryed to install them along with others updates listed and it showed they succeeded along with the others but when I rest...

need to create a formula to create a timesheet but haven't a clue
Timesheet Formula: I am trying to create a formula to calculate whether the hours used are either time and a half between x-y hours. Completely useless on Excel. Depends upon the rules. For instance, if anything over 8 hours is overtime then =MAX(end_time-start_time-TIME(8,0,0),0) If it is any hours outside ofv pre-set start and end times, say 08:00 and 16:00 then =MAX(TIME(8,0,0)-start_time,0)+MAX(end_time-TIME(16,0,0),0) -- HTH RP (remove nothere from the email address if mailing direct) "AHurd" <AHurd@discussions.microsoft.com> wrote in message news:5FF79B03-92...

Outlook Today Messages column
What is this column used for in Outlook2003? In 2000 it showed which folders had unread messages in them and you could click on a folder name and be switched to that folder, but it doesn't seem to show anything in 2003. If in fact it doesn't do anything, can it be removed? Ken > What is this column used for in Outlook2003? In 2000 it showed which > folders had unread messages in them and you could click on a folder > name and be switched to that folder, but it doesn't seem to show > anything in 2003. If in fact it doesn't do anything, can it be > removed?...

Snake or Newspaper Style a Single-column Report
My report has one column: surname. I want this one column to snake across the page. I've looked at columns in page setup. The option to print down then across is greyed out when there is only one column. I changed the column number to two to gain access to this option and then changed it back because I really only have 1 column. All of this to no avail. Can someone help please? I need specific help on what to do and where to do it since I've tried the obvious and it doesn't seem to work. Thanks a lot! ....Dana The number of columns is the number of print ...

I need to combine data from 2 spreadsheets
I'm not good with macros, so if we could do this simply, I would appreciate it. Spreadsheet 1 I have a list of all my accounts The headings I need from that spreadsheet are: Column A id Column B name Column C billing_address_street Column D billing_address_city Column E billing_address_state Column F billing_address_postalcode Column G billing_address_country Spreadsheet #2 This is a list of registration numbers Column A R/N Column B Product Column C Account...

Need to import Exchange database
I have reluctantly reinstalled Exchange 2003 on our server. Somwhow I got things really messed up and had to clean house. My situation is this: I had a bunch of contacts on the old Exchange 2003 server. I saved the MDBData folder (Priv1.edb, Priv1.stm and pub1.edb, pub1.stm files) I'm not sure but I hope this is where Exchange has stored mailbox contacts, mail, etc. If it is, how can I import this into our new installation fo Exchange? Pretty much everything is the same (except it all works this time :) This is running in a test lab and we only had 2 servers, a x64 DC and this Exchang...

Search feature is needed in by date, name, id, telnumber, ...
hi Search feature is needed in by date, name, id, telnumber, in SDI Application. from file. I want to implement search feature in my application... and display those things ... Thank u in advance... Read file, compare string, when you find it display it. I would have been able to help out more if I hadn't skipped that mind reading class in college. :) AliR. "sargio" <naveenee20@gmail.com> wrote in message news:1136303289.450386.248270@g49g2000cwa.googlegroups.com... > hi > > Search feature is needed in by date, name, id, telnumber, in SDI > Application. ...

Copy/Paste very slow with separate excel window
I have a spreadsheet with 32,000 rows and 15 rows. When I copy data from the spreadsheet and click File New and then paste into the spreadsheet it is very fast. BUT when I launch another Excel instance and do a paste it is very slow. Now if I delete about 15,000 rows, the copy/paste is faster. Is there some sort of limitation of Windows 2000/xp or Excel. IT happens in Excel 2000 and 2003 versions. This is for our customer service department who works in Excel all day and they say they must have several Excel windows open for some reason. Not my place to argue with them. Try t...

40 column receipt #2
Hi All, I am customizing my 40 column receipt I want to do something like <ROW> "This Coupon Expires on : " Transaction.Date + 15 </ROW> I would like to see (Transaction.Date + 15) in date format right now it prints some number. How do I do that? OR is their any better way to this? Thanks ...