+ Reply to Thread
Results 1 to 5 of 5

Dynamic Vlookups?

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2010
    Posts
    1

    Dynamic Vlookups?

    Okay so I have two sheets that look like this:


    Edit: Okay so the formatting was screwed there, fixing for a table:

    Location Location A Location B Location C
    Total Price ??? ??? ???
    Item A 500 0 20
    Item B 50 20 30
    Item C 0 0 10
    Item D 12 15 10

    Sheet2 (Price List)

    Item Price
    Item A 3.14
    Item B 12
    Item C 4.57
    Item D 2

    How do I get a formula that looks up the price of ITEMA...B...C... multiplies that value by the value of the corresponding item on the Price List, then sums them altogether.

    I know that I can use a bunch of VLOOKUPS to do this and then sum them one by one. However, my sheet actually has well over 50 values and those kinds of formulas will take forever to update.

    I believe the answer lies somewhere with a SUMPRODUCT array formula, I am just not seeing it right now.

    Any help would be appreciated.

    Thank You!
    Last edited by somehowsomeway; 10-08-2012 at 06:54 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Dynamic Vlookups?

    This is an Excel Forum, so posting a sample workbook demonstrating the layout of your data and a manually mocked set of "results" you want to achieve by formula is the way to get this right on the first try.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your sample workbook. Make sure the workbook demonstrates your desired results.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dynamic Vlookups?

    The way you present it with two lists with the same records in would be easily be solved with an ordinary SUMPRODUCT.

    I then realized that the first list probably can be scrambled and have multiple Item A, multiple Item B etc. and/or items that are not in the second list. In that case I don't know how to solve it without involving VLOOKUP.
    Attached Files Attached Files
    Last edited by Jacc; 10-09-2012 at 05:40 AM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dynamic Vlookups?

    I was surprised of how easy it was to put a VLOOKUP in an array formula. It worked on the first try, almost.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dynamic Vlookups?

    Note to self, VLOOKUP does not work with arrayformulas, LOOKUP does.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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