+ Reply to Thread
Results 1 to 4 of 4

If 2 columns match - return value

  1. #1
    Forum Contributor
    Join Date
    02-04-2015
    Location
    India
    MS-Off Ver
    365 (2202)
    Posts
    275

    If 2 columns match - return value

    Hello Excel Experts,

    If Column 1 and Column 2 match - than return the value which is in column 3

    For eg ; Please refer to attached sheet.

    Regards,
    Prakash
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If 2 columns match - return value

    Three options.
    1. In Column A starting at A4 copied down

    =B4&C4
    Then use =VLOOKUP(B18&C18, $A$4:$D$15,4, FALSE)

    2. Use an Arrayed formula
    =INDEX($D$4:$D$15, MATCH(B19&C19, $B$4:$B$15&$C$4:$C$15,0))
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    3. Use this formula
    =INDEX($D$4:$D$15, MATCH(B20&C20,INDEX(B4:B15&$C$4:$C$15,),0))

    I believe #1 is the most efficient if you have large amounts of data.
    See attached where I used all 3 formulas.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: If 2 columns match - return value

    Like this?

    Please Login or Register  to view this content.
    Notes:
    This will return zero if there are no matches of name / part number
    If there are non-unique entries (eg, there are two places the "A, 2, 20" combo is listed), those will be summed up (for 40 for example)
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  4. #4
    Forum Contributor
    Join Date
    02-04-2015
    Location
    India
    MS-Off Ver
    365 (2202)
    Posts
    275

    Re: If 2 columns match - return value

    ChemistB,

    Thanks....I applied all the formulas to my vast data....and it is working to a maximum limit.

    Cheers

    Many Thanks,
    Peggy

+ 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. MATCH two columns to return a corresponding value!
    By cs02 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-18-2015, 07:04 PM
  2. Replies: 9
    Last Post: 12-16-2013, 04:02 AM
  3. Replies: 20
    Last Post: 04-15-2013, 01:06 PM
  4. Replies: 12
    Last Post: 03-29-2013, 03:02 PM
  5. Replies: 2
    Last Post: 06-29-2011, 01:36 PM
  6. Match Columns in 2 Worksheets, return only changed values of other columns
    By cheynooki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2011, 01:19 PM
  7. Replies: 5
    Last Post: 10-11-2008, 04:01 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