+ Reply to Thread
Results 1 to 11 of 11

Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Hi guys, can someone help me with the following problem:

    I have a single workbook. This currently contains 4 spreadsheets. Blue, Red, Green and White.
    1. I have a single workbook
    2. This currently contains 4 spreadsheets (Blue, Red, Green and White.)
    3. The Blue, Red and Green spreadsheets have the same layout. The columns of interest are column C which is a target code, column D is a target description)
    4. The White spreadsheet is the master list and contains column A which is the code and B which is the description.
    5. The Blue, Red and Green tabs have a formula in place in their target description columns (D) that looks at its code in column C and compares this to the one in the White tab (column A) and then imports the corresponding description to the code from the White tab (column B) if present.

    I have added an example below:
    Attachment 434363

    The problem I have:
    1. In the White tab I want to add the ability to see if the value is used in either the Red (column C), Blue (column C) or Green tabs (column C) and return an indicator based on the below:
    2. So for example: If the value is only used in the Blue tab (matching value in Blue!C:C then indicate ‘blue’ in cell D2 on the White tab.
    3. If only the Red tab: indicate ‘red’ in cell D2
    4. If only the Green tab: indicate ‘green’ in cell D2
    5. If in Blue and Red but not green then ‘Blue and Red’ in cell D2
    6. If in Blue and Green but not Red then ‘Blue and Green’ in cell D2
    7. If in Red and Green but not Blue then ‘Red and Green’ in cell D2

    I believe the VLOOKUP function is required nested in an IF statement.

    Could someone be kind enough to point me in the right direction.

    I appreciated any help what-so-ever

    Thanks,

    Sam

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    That's not the same as attaching a workbook.

    Pete

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    I know this is your 2nd attempt, but we prefer to use a sample workbook, not a pic - we cannot edit/work with a pic

    Please attach your sample workbook to this thread

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    FDibbins, thanks just seen your post. Will follow instructions and add the attachment.

    Thanks

  5. #5
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Hopefully this works:

    Temp.xlsx

    Please also note I used 'Name Manager' to create a white list (which is used in the formula in the Blue, Red and Green Tabs for column D)


  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Yup, that worked fine, thanks

    1st, I think you have your "New Description" formula a bit wrong...
    =IF(A2<>"",VLOOKUP(C2,White,2,FALSE),VLOOKUP(C2,White,2,FALSE))
    This is using the same vlookup() whether A2 is empty or not (thats why GREEN D2 is showing an error)

    I think you meant...
    =IF(A2="","",VLOOKUP(C2,White,2,FALSE))

    2nd, I know that is a dummy file, but are there more than 3 "colors"?


    3rd, what is the unique ID there - the Code, the Description - or both?

  7. #7
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Hi FDibbins,

    To answer the following questions:
    1) The green tab is yet to be populated but it will contain data at a later date. The error that is showing is not really a concern.
    2) No, the three colors currently listed are the final amount. No others shall be added nor are there any others present in my master file.
    3) The code is the unique identifier. The description is just brought across into the other tabs if a match on the code is found in the White tab.

    Please let me know if you need any other details

    Kind regards,

    Sam

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    I understand that the tab has no data yet, but if you change to what I suggested, you wont show those errors.

    Try this for the extract, it's a bit messy, but it works

    =TRIM(IF(ISERROR(VLOOKUP(A2,BLUE!$C$2:$D$4,2,0)),"","Blue")&" "&IF(ISERROR(VLOOKUP(A2,RED!$C$2:$D$4,2,0)),"","Red")&" "&IF(ISERROR(VLOOKUP(A2,GREEN!$C$2:$D$4,2,0)),"","Green"))

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    See attached using helper columns (with MATCH) and VLOOKUP

    =IFERROR(IF(MATCH($A2,BLUE!$C:$C,0),"B",""),"")



    =VLOOKUP($E2&$F2&$G2,$H$1:$I$6,2,0)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Hi FDibbins,

    Sorry I didn't mean to sound dismissive with your previous suggestion. I will apply the formula as it definitely seems an improvement.

    I have also tried the formula you've suggested and it seems to work perfectly.

    Thanks for all your work, it's really appreciated..! This really is one of the best forums I've used and is appears to contain a pool of people with a great amount of talent.

    I'll flag this thread as solved.

    Kind regards and thanks again,

    Sam

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Complex VLOOKUP - Identifying values used in different spreadsheet - combinations :)

    Quote Originally Posted by s_bruno1 View Post
    Sorry I didn't mean to sound dismissive with your previous suggestion. I will apply the formula as it definitely seems an improvement.
    No problem, I did not take it that way

    Thanks for the kind words, yes we do have members here with extraordinary talents
    (and thanks for the feedback too)

+ 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: 3
    Last Post: 12-09-2015, 09:34 AM
  2. Identifying common threads in a spreadsheet
    By tbrookes3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2015, 03:06 AM
  3. [SOLVED] Complex Excel Identifying Function
    By SirAsksAlott in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2015, 10:00 PM
  4. [SOLVED] Macro Error when identifying spreadsheet values
    By kibbles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2013, 07:11 PM
  5. Identifying multiple value combinations
    By vicentiu in forum Excel General
    Replies: 0
    Last Post: 07-26-2013, 07:05 AM
  6. Identifying complex duplicates
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2006, 07:25 PM
  7. Using Vlookup to add values to a spreadsheet
    By MasterGee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2005, 11:05 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