+ Reply to Thread
Results 1 to 7 of 7

Sum Products/Sum If error

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Sum Products/Sum If error

    Hello,

    Please see the attached sheet and the formulas in the 'ENE' worksheet. I am trying get the figures to accumulate in Asistencia through the year but the formula isn't working.

    Any help much appreciated.

    Thanks,


    John
    Attached Files Attached Files

  2. #2
    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: Sum Products/Sum If error

    Hi,

    If your data was going to be consistent on each monthly sheet then a simple =SUM(Start:END!A1) formula would sum across each sheet between two blank anchor sheets 'Start' and 'End'

    However you have more names on your Asistencia sheet than you have on the first January sheet and I'm assuming that each sheet may therefore have a different layout in terms of the rows.

    All that said, you would be much better advised to keep all your data on a single sheet. All you need to do is use the current columns and add an additional column for the month. When you have this simple two dimensional database you'll then be able to use a Pivot Table to analyse and summarise your data in any way you want.

    You are just complicating things at the moment and any solution using formulae will be no doubt require quite complex array formulae. A macro would be another solution but in all honesty I'd go for the single database sheet.
    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.

  3. #3
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sum Products/Sum If error

    I agree that a Pivot Table would be the simpler way here. However the months need to be separated and the client has requested this format.

    More importantly though, I would be interested to see where I went wrong...

    Thanks,


    John

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sum Products/Sum If error

    Hello John,

    With the formula you tried all the sheets listed in K2:K9 must exist otherwise you get an error - if you create all 8 sheets your formula will work, or restrict the sheet range to K2:K3 for the two sheets that currently exist.....alternatively if you want the formula to reference K2:K9 when some of those sheets may not yet exist you can add an IFERROR function, i.e. like this

    =SUM(IFERROR(SUMIFS(INDIRECT("'"&$K$2:$K$9&"'!$D$5:$D$50"),INDIRECT("'"&$K$2:$K$9&"'!$B$5:$B$50"),$B5,INDIRECT("'"&$K$2:$K$9&"'!$C$5:$C$50"),$C5),0))

    that now needs "array entry", i.e. confirm with CTRL+SHIFT+ENTER
    Audere est facere

  5. #5
    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: Sum Products/Sum If error

    Hi,

    Because you don't yet have sheets for March - August. i.e. your K2:K9 references. If you add those sheets or change to K2:K3 then it will work.

    However I still think this is unnecessarily complicated. One thing I've learned over the many years I've dealt with this stuff is that clients are totally unaware of how powerful Excel can be if they just rethink their mindset.

    Many people mix up the two elements of data capture and final reporting. The two require quite different treatments.
    A lot of people start by designing the form that they expect to see as the final report, and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it.

    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    In this case, and if the client still exists on this layout I'd turn this on its head and urge you to capture the data in the table I described earlier. Then in order to produce the individual sheets that the client seems to want, just have a simple looping macro that filters data from the data sheet to the individual monthly sheets. Or better still if the client can adapt to a single monthly sheet where you select the month from a drop down and that particular month is filtered out.

  6. #6
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sum Products/Sum If error

    Thank you to you both - this is definitely my favourite forum!

    The explanation and addition of IFERROR worked beautifully and I now have all my sheets up and running.

    I do enjoy a good pivot table as much as the next man, but I currently use them for very basic tables and calculations and would be interested to learn how to get them to function across multiple worksheets if you could me in the direction of any info that relates to what I'm doing.

    Thanks again!


    John

  7. #7
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Sum Products/Sum If error

    Hi
    =IFERROR(INDEX(ENE!$D$5:$I$11,MATCH(1,(ASISTENCIA!$A10=ENE!$A$5:$A$11)*(ASISTENCIA!$B10=ENE!$B$5:$B$11)*(ASISTENCIA!$C10=ENE!$C$5:$C$11),0),MATCH(ASISTENCIA!E$4,ENE!$D$4:$I$4,0)),"") CSE
    Appreciate the help? CLICK *

+ 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. Formula to work out how many products among various products!
    By MissConfussed in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-02-2013, 02:24 PM
  2. [SOLVED] Sum Alternating Products
    By rodich in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-16-2011, 04:35 AM
  3. Sum of range of products
    By pqt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-28-2008, 12:01 AM
  4. Adding Products
    By carsch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-28-2006, 12:10 AM
  5. [SOLVED] Products
    By Gene in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2005, 08:07 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