+ Reply to Thread
Results 1 to 6 of 6

Thread: Comparing Old and New Names, two columns

  1. #1
    Registered User
    Join Date
    06-12-2007
    Posts
    9

    Comparing Old and New Names, two columns

    I want to compare two columns of data and in a third column have excel label whether the data is "new", or "old". I have to sort through a bunch of names, and label them as new or old. The names that start in column one are the old ones, the names that are in column 2 are a mix of old and new, and I would like to put a label next to each in column three stating whether they are old or new. Here's a brief example of what I'd like to do:

    PHP Code: 
    Andy      James       "New"
    Eric        Andy         "Old" 
    Tim         Matt        "New"
    Blake       Eric          "Old"  
    Craig       Tim          "Old" 
                  
    Blake       "Old"
                  
    Craig       "Old" 
    Any tips on where to start?

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    Your example doesn't make sense to me...

    I see Andy in both columns and Eric in both columns, yet Andy is "New" and Eric is "Old".

    How exactly is the comparison supposed to work? Are you checking column A against column B or vice-versa?

    Please elaborate.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Forum Guru
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,102

    ...

    Should the 4th column be the result D1: =IF(C1="New",B1,A1)
    Otherwise, I think there is a rule missing. What should be calculated?
    //Ola

  4. #4
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566
    Hi

    =IF(ISERROR(MATCH(B1,A$1:A$100,FALSE)),"New","Old")

    Alter ranges as appropriate

    Rgds

  5. #5
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    I think I see it now.. you are comparing column B to column A

    I think this formula should do it then//

    =IF(isnumber(match(B1,A:A,0)),"Old","New")

    copied down.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  6. #6
    Registered User
    Join Date
    06-12-2007
    Posts
    9
    Cool, just tried it and it seems to work. Thanks for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0