+ Reply to Thread
Results 1 to 5 of 5

Calculating totals for items with associated quantities over multiple rows

  1. #1
    Forum Contributor
    Join Date
    04-30-2009
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    496

    Calculating totals for items with associated quantities over multiple rows

    Hello everyone,
    I have attached a sample spreadsheet in the hopes someone is able to assist me.

    What I am trying to accomplish is to associate each product on the Distribution tab in 'E' to its associated quantity in 'F' so I can count the total number of each product and display this in 'D' on the Totals tab.

    Once this is done, the total for each product would me multiplied by the associated price in 'C' on the Totals tab to achieve the total item value for each item in 'E'.

    I have included the current results and what the correct values should be. As you can see, I tried to use 'Countif' with no success. I could not find any solutions in the forum that were close enough to this situation to work.

    Thanks in advance for your help!!

    Andrew
    Attached Files Attached Files
    Last edited by drewship; 05-04-2009 at 01:24 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Calculating totals for items with associated quantities over multiple rows

    change formula in D3 to:

    =SUMIF(Distribution!E:E,A3,Distribution!F:F)

    and copy it down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    04-30-2009
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    496

    Re: Calculating totals for items with associated quantities over multiple rows

    Wow do I feel dumb...I started out with SUMIF but am not familiar enough with it so I tried COUNTIF which I have used before and thought it would work.

    Thanks much!!!

  4. #4
    Registered User
    Join Date
    04-21-2009
    Location
    Ecuador
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: Calculating totals for items with associated quantities over multiple rows

    Hi Andrew,

    I think you are using the wrong function.

    Use SUMIF Instead of COUNTIF.

    Why?

    COUNTIF counts values in a range that meet one criteria; For example count all JOHNs in the Employee Name Column.

    Your case is different...

    You have the criteria in one column and the values to sum in another one; SUMIF does this very efficiently.

    I attached the solution

    Don't stop there, learn more about these functions, visit:

    http://www.excel-spreadsheet-authors.com/sumif.html
    http://www.excel-spreadsheet-authors.com/countif.html
    Attached Files Attached Files
    John Franco
    https://www.excelgurusacademy.com/

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Calculating totals for items with associated quantities over multiple rows

    drewship,

    See the attached "Products.zip", containing workbook "INDEX MATCH SUMPRODUCT - Calculating totals for items with associated quantities over multiple rows - Products - drewship - SDG.xls"
    Attached Files Attached Files
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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