+ Reply to Thread
Results 1 to 6 of 6

Vlookup between 2 different columns depending on another column value

  1. #1
    Registered User
    Join Date
    01-20-2019
    Location
    lisbon
    MS-Off Ver
    excel for mac 2011 - 14.0.0
    Posts
    3

    Vlookup between 2 different columns depending on another column value

    Im new to excel and im pretty sure this is an easy one but i just cant find the way to:

    Have a formula that returns, in the column N, the value of column L or the value of column M, depending on the number at column D.

    Captura de ecrã 2019-01-21, às 00.23.28.png


    Can you help?

    Thanks a lot

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Vlookup between 2 different columns depending on another column value

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-20-2019
    Location
    lisbon
    MS-Off Ver
    excel for mac 2011 - 14.0.0
    Posts
    3

    Re: Vlookup between 2 different columns depending on another column value

    Here it is:
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Vlookup between 2 different columns depending on another column value

    Please try at D2 and drag down

    =IF(VLOOKUP(A2,ORC!$A$2:$B$250,2,)=$F$3,B2,C2)

  5. #5
    Registered User
    Join Date
    01-20-2019
    Location
    lisbon
    MS-Off Ver
    excel for mac 2011 - 14.0.0
    Posts
    3

    Re: Vlookup between 2 different columns depending on another column value

    "The formula you typed contains an error"

    Aint something missing here: =IF(VLOOKUP(A2,ORC!$A$2:$B$250,2, ??? =$F$3,B2,C2)

    Thanks a lot!

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Vlookup between 2 different columns depending on another column value

    It's working fine here, I leave the last Vlookup argument blank mean 0 for the exact match.

    It works the as as this
    =IF(VLOOKUP(A2,ORC!$A$2:$B$250,2,0)=$F$3,B2,C2)


    2019-01-22 23_40_46-sample.xlsx - Excel.png
    Attached Files Attached Files

+ 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. Array of columns, SUMIF a particular column, depending on a certain criteria
    By kiwihunter in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2014, 10:04 AM
  2. [SOLVED] Transform Column to several columns depending on condition.
    By dimitrov_dimityr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-14-2013, 08:11 AM
  3. Replies: 2
    Last Post: 09-04-2013, 06:06 PM
  4. select only certain columns depending upon last row in column A
    By mickjjuk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2013, 11:42 AM
  5. Replies: 1
    Last Post: 02-16-2012, 09:18 AM
  6. Vlookup depending on multiple columns.
    By b4d_k42ma in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2007, 08:11 AM
  7. summe column depending of other columns
    By jokenjo in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-15-2007, 06:13 PM

Tags for this Thread

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