+ Reply to Thread
Results 1 to 6 of 6

Summing an area when a condition is met

  1. #1
    Registered User
    Join Date
    01-31-2021
    Location
    England
    MS-Off Ver
    16.45
    Posts
    2

    Summing an area when a condition is met

    Hello ,

    This is my first post on the forum and I would appreciate any advice. I currently helping my parents bakery to add up the bakers list for each day of the week.

    I need to sum the row for each product (A1:A86) in each column of where the product is ordered and then that result appear on the right (R4:R86).

    Essentially the right column is a sorted column of goods for the baker to handle. The left hand screen is a summary tab of all the orders from various parts of the business. The right then brings all this together to create a ordered list.

    I have started with a sumproduct formula, matching the right and left list of products, but I cant seem to get it to work. for example.

    =SUMPRODUCT(--($A$3:$A$291=Q4)*(B3:F3)).

    Any advice would be hugely appreciated, pretty new to Excel.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Summing an area when a condition is met

    Welcome to the forum.

    From the attachment:

    For example.. Total Barm should be 7
    Where and why?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Summing an area when a condition is met

    Hi,
    Try this perhaps in R4 :
    =SUMPRODUCT(INDEX($A$1:$F$34,MATCH(Q4,$A$1:$A$34,0),2):INDEX($A$1:$F$34,MATCH(Q4,$A$1:$A$34,0),MATCH(1,1/($A$1:$L$1<>""))))

    ?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Summing an area when a condition is met

    Since the products in column Q are not the same as the product in column a on the same row all your Sumproduct is doing is multiplying the number of occurrences of the column Q found in column A, which is always 1 by the sum of the values on the same row in B:F.

    You'd be better advised to add a total column G and use a SUMIFS formula (which largely replaced the need for a Sumproduct function)
    i.e. =SUMIFS(G:G,A:A,Q4)

    But personally I'd use a pivot table which will be more flexible when you want to analyse other information.

    See attached.

    Your current layout is sort of OK, but personally I'd consider creating a normalised data base range for recording your data. That means a column for each TYPE of thing and rows to record each unique record. If I was designing this from scratch I'd have columns for

    Date
    Shop
    Method ' i.e. Values would be Shop, Click & Collect, Market, WHolesale, Other
    Quantity

    That layout will give you a more efficient system.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Summing an area when a condition is met

    R4=SUM(IF($A$3:$A$100=$Q4,$B$3:$F$100))

    Control +shift+enter

    copy down

  6. #6
    Registered User
    Join Date
    01-31-2021
    Location
    England
    MS-Off Ver
    16.45
    Posts
    2

    Re: Summing an area when a condition is met

    Thankyou ever so much, very helpful all of you. I will also look into using pivot tables to improve the efficiency of the spreadsheet.

    Hamish.

+ 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. [SOLVED] Summing Subject to an OR condition
    By andrewc in forum Excel General
    Replies: 2
    Last Post: 03-27-2014, 12:41 PM
  2. summing totals with condition into another worksheet
    By ChuckM1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2010, 09:35 PM
  3. Change area fill based on condition
    By jmoffett in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-27-2010, 04:07 AM
  4. Summing from another sheet with Condition
    By myinsuranceguy in forum Excel General
    Replies: 1
    Last Post: 12-04-2007, 04:46 PM
  5. Summing prices given a condition
    By jspinx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-29-2007, 04:29 PM
  6. Problem with Summing 1 condition
    By rushthecourt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-04-2007, 06:05 AM
  7. Summing based upon condition
    By retseort in forum Excel General
    Replies: 5
    Last Post: 07-13-2005, 04:05 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