+ Reply to Thread
Results 1 to 5 of 5

Best Way to Calculate data from two tables in a sheet. VLOOKUP?

  1. #1
    Forum Contributor
    Join Date
    06-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Best Way to Calculate data from two tables in a sheet. VLOOKUP?

    Hello! I have two tables and I want to be able to use the data to total up quantities and product types into a third table.

    I can figure out how to do this manually by having one cell times another plus one cell times another and so on and so forth but seems to me there has to be a simpler formula that I don't know of or am not remembering. I've attached my spreadsheet.

    I'm looking for the Cell B21 to calculate the total amount of dollars needed in January for dishwashers. The top table shows the number of units I will need by unit type (in column A) and the second table shows the amount of each of the items by unit type. In this case we would be looking at Column P.

    I would greatly appreciate any help anyone can provide!
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Best Way to Calculate data from two tables in a sheet. VLOOKUP?

    B21 =SUMPRODUCT(($B$11:$P$11="DW")*$B$12:$P$18*B$2:B$8) Drag this through M21.
    B23 =SUMPRODUCT(($B$11:$P$11="Microwave")*$B$12:$P$18*B$2:B$8) Drag this through M23.
    etc.

    Unless you match the names in A21:A32 with the names in B11:P11 somehow, you will have to hard-code the values into the formulas.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Best Way to Calculate data from two tables in a sheet. VLOOKUP?

    Looks like sumproduct will do it..

    B21: =SUMPRODUCT(B$2:B$8,$P$12:$P$18)

  4. #4
    Forum Contributor
    Join Date
    06-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Best Way to Calculate data from two tables in a sheet. VLOOKUP?

    Wow I guess I really over-thought that one!

    Thanks!

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Best Way to Calculate data from two tables in a sheet. VLOOKUP?

    You're welcome.

    Like FalconDude said

    If you can make the values in A21:A32 match up exactly with the values in B11:P11, then it would be much easier to formulate which column needs to be used.

    Something like this
    =SUMPRODUCT(B$2:B$8,INDEX($B$12:$P:18,0,MATCH($A21,$B$11:$P$11,0)))

+ 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. IF and VLOOKUP Function to calculate payroll taxes using tables
    By nerrawsl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2016, 12:18 AM
  2. Replies: 4
    Last Post: 10-16-2015, 12:59 PM
  3. Calculate Percentage Using Data from Multiple Tables
    By kmcbriarty in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-04-2015, 06:47 AM
  4. Do not calculate data tables when saving or opening
    By oddstandard in forum Excel General
    Replies: 4
    Last Post: 06-06-2014, 05:54 AM
  5. Multiple Data Tables Link and Calculate onto Target Tables
    By billexchry in forum Excel General
    Replies: 6
    Last Post: 03-04-2011, 02:42 PM
  6. Replies: 10
    Last Post: 01-28-2011, 05:39 PM
  7. How to select/calculate entire sheet excluding tables?
    By Kelvin Stott in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2010, 06:31 PM

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