+ Reply to Thread
Results 1 to 5 of 5

Three columns table, if matches two columns, get data from adjacent third column

  1. #1
    Registered User
    Join Date
    02-25-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    9

    Three columns table, if matches two columns, get data from adjacent third column

    I have three columns (A,B,C) table:

    red pencil 4
    green pen 2
    blue pencil 2
    green pen 1
    white pen 3
    cyan pen 4
    blue pen 1

    I want to have a 4th column, which will get value from 3rd column C, if column A and column B are true for my search. For example: =IFS(A:A,”red”,B:B,”pencil”, D:D=C:C) should yield 4. I just made up this function. But I’m sure there must be some elegant way of achieving it.

    Thanks for the help in advance.
    Last edited by pban92; 05-23-2020 at 09:32 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    12,855

    Re: Three columns table, if matches two columns, get data from adjacent third column

    HOW TO ATTACH YOUR SAMPLE WORKBOOK:

    Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-23-2020
    Location
    Guwahati, Assam, India
    MS-Off Ver
    2019
    Posts
    16

    Re: Three columns table, if matches two columns, get data from adjacent third column

    What are the conditions for column A and B to be true you want which will have Column C data in Column D ? Please specify the conditions clearly..
    Asha Kanta Sharma
    Guwahati, India

  4. #4
    Registered User
    Join Date
    02-25-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Three columns table, if matches two columns, get data from adjacent third column

    Added an example. Hopefully would make better sense. Thanks.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Office 365 (Win 10 - Work) & Office 365 Subscription Insider (Win 10 - Home)
    Posts
    37,691

    Re: Three columns table, if matches two columns, get data from adjacent third column

    No file attached.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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