+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP using text in multiple cells as lookup value?

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question VLOOKUP using text in multiple cells as lookup value?

    Hi everybody!

    I am looking for a way to do a VLOOKUP or something similar using the text in 3 cells as search criteria. Concatenating these cells probably would not work as the words in the name don't necessarily follow the same order.
    Please see file in attachment. (This is a very simplified version, the real workbook is far more complex with hundreds of products.)

    On Sheet 2, I have a list of items; item code on column A, item name on column B and price on column C.
    On Sheet 1, I want to create a price table for different items. Is there anyway to search the text on cells A1, B3, A4 through column B of Sheet2 and return the price for the item on B4? (In this case it would be item on row 2 of Sheet2)

    Any help will be highly appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VLOOKUP using text in multiple cells as lookup value?

    In B4 cell - Array Formula - Requires Ctrl+Shift+Enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.

    If you would like to include the A1 cell also as one of the criteria then use the below formula Array Formula - Requires Ctrl+Shift+Enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Adapt the cell references to your data range.

    Hope this helps!


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  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,929

    Re: VLOOKUP using text in multiple cells as lookup value?

    looking at you're data, a few questions...

    i presume that on sheet1
    A1 is this part...GB/T5781Hex Bolt FT CL4.8 M5-0.8X10PL
    B3 is this part...GB/T5781Hex Bolt FT CL4.8 M5-0.8X10PL
    but is A4 this part?...GB/T5781Hex Bolt FT CL4.8 M5-0.8X10PL

    also, why do you have 2 12's in column A?

    edit: is the data in A1, B3 and A4 always in the same place in the name on sheet2?
    Last edited by FDibbins; 10-31-2012 at 02:01 AM.
    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
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VLOOKUP using text in multiple cells as lookup value?

    Quote Originally Posted by :) Sixthsense :) View Post
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In the above formula forgot to Protect the range Sheet2!B2:B15 with dollar symbols. So change it to Sheet2!$B$2:$B$15

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VLOOKUP using text in multiple cells as lookup value?

    Quote Originally Posted by :) Sixthsense :) View Post
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In the above formula forgot to Protect the range Sheet2!B2:B15 with dollar symbols. So change it to Sheet2!$B$2:$B$15

  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,929

    Re: VLOOKUP using text in multiple cells as lookup value?

    see if the attached is what you need?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-26-2012
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: VLOOKUP using text in multiple cells as lookup value?

    Brilliant! Thank you so much Sixthsense!!

    I changed a bit the formula in order to add A1 as one of the criterias and this seems to be working perfectly for me:
    =IFERROR(INDEX(Sheet2!$C$2:$C$15,MATCH(1,(ISNUMBER(SEARCH(B$3,Sheet2!$B$2:$B$15)))*(ISNUMBER(SEARCH($A4,Sheet2!$B$2:$B$15)))*(ISNUMBER(SEARCH($A$1,Sheet2!$B$2:$B$15))),0)),"")


    @FDibbins
    The 2 12's in column A was a mistake on my part, sorry for the confusion!
    A1 = Hex Bolt FT CL4.8, B3 = M5, A4 = 10, so the formula would search for a cell which contains ALL three words, in this case it would be B2 on Sheet2.


    Thanks again for both of you! You saved me many hours of repetitive work

  8. #8
    Registered User
    Join Date
    09-26-2012
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: VLOOKUP using text in multiple cells as lookup value?

    Oh, just saw your second post FDibbins, that's an interesting alternative! Thank you!

    I'm putting this issue as solved.

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VLOOKUP using text in multiple cells as lookup value?

    @ FDibbins,

    That was well done!
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  10. #10
    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,929

    Re: VLOOKUP using text in multiple cells as lookup value?

    happy to help, and thanks for the rep

+ 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