+ Reply to Thread
Results 1 to 4 of 4

Comparing two columns and if there is a match...

  1. #1
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Comparing two columns and if there is a match...

    Hi,

    I am trying to comparing two 'text' columns and I would like that if a match occurs the value in an adjacent column, same row of the match will be displayed.

    The match function is a bit unclear to me. so for example below the formula should look for Amir in colum D and give back the figure "4" or eventually a string of text in column E

    example.jpg


    Thanks for your help

    Carmine
    Last edited by Carmine; 04-10-2015 at 09:24 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Comparing two columns and if there is a match...

    Hi Carmine,

    I saw my name in this problem so I needed to do it. I think you are looking for the Index and Match functions put together. See the attached for an example of what I mean.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Comparing two columns and if there is a match...

    All Marvin are wonderful in what they do! Thanks

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Comparing two columns and if there is a match...

    Hi Carmine,

    Looking at the picture in your post #1 you have a second option for getting an answer. If what you are looking for is in the leftmost column of your table of data you can use a VLookup function also. VLookup is a special case of the Index/Match combination.

    In B1 you could use this formula:

    =VLookup(A1,$D$1:$E$6,2,False)

    This says to look at A1 and find it in the list of words in Column D. When it finds it go to the Second column over and return that value. The False part means it must be an exact match to what is in A1.

    We need to use the Index/Match combination when what we want to return is to the left of what we are looking for. This idea makes TABLES of data very important in Excel. It can work with Rows and Columns that are together and lined up much more effectively than numbers spread out on a worksheet. I hate to see people make their data "look pretty" with colors and merged cells without using tables. The structure of the data makes Excel work better if it is in Tables of data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-23-2013, 08:59 PM
  2. Comparing columns and deleting those that do not match
    By Insert Name in forum Excel General
    Replies: 11
    Last Post: 01-01-2013, 06:16 PM
  3. [SOLVED] Comparing two columns and displaying a third value if they match
    By pdxcollegegrl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-29-2012, 12:46 PM
  4. Comparing multiple columns using MATCH
    By krpandrei in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2012, 10:21 AM
  5. Comparing 2 columns- if a match is found return a value in 3rd column
    By lineson in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-20-2011, 04:48 PM

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