+ Reply to Thread
Results 1 to 3 of 3

Compare two cells

  1. #1
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Compare two cells

    Hello out there,

    I am looking for a way to compare two cells in the same rows of different columns.
    I basically want to tell if the cells are the same (then "True") or not (then "False").
    The problem is, that in the one column, there is sometimes more information, e.g. in one column, there is just the surname but in the other one is the surname followed by the given name.

    Can I make Excel compare just the beginning of cells, such as the first 5 characters or so?

    Thanks in advance.
    Last edited by Cunner; 03-26-2010 at 04:14 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Compare two cells

    Hi,

    in your example it is indeed possible
    if data is in a1 and a2 something like
    =if((left(a1,5)=left(a2,5)), do something, do something else)

    To make sure this answer helps you can attach a sample worksheet

  3. #3
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Re: Compare two cells

    Perfect.
    I didn't know the "Left" Formula. With this, it works just nice now.

    Thanks a lot.

+ 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.6.0 RC 1