+ Reply to Thread
Results 1 to 8 of 8

Formula only calculating sum from first page, not universally through workbook

  1. #1
    Registered User
    Join Date
    04-20-2013
    Location
    Normandy
    MS-Off Ver
    Excel 2003
    Posts
    4

    Formula only calculating sum from first page, not universally through workbook

    I have inherited a workbook which I have been asked to enhance. My excel experience is not stellar, far from it but as with my things I like to give it a fair shot.

    I have a checking in workbook that calculates the movements of stock throughout the day. The workbook allows me to record when I receive stock and calculates how much stock passes through each hour and records this in a cell at the bottom of the sheet. However when I move to the 2nd page it does not continue adding to the totals at the bottom.

    For instance, this formula is in one of the bottom cells that collects the data and adds it all up.

    =SUMPRODUCT(--(timein>=0.875),--(timein<=0.961),cases)

    Why wouldn't it apply to the entire sheet?


    I have read the forum rules and apologise if I have fallen foul of them. I would appreciate any help as I am just starting to learn excel myself.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula only calculating sum from first page, not universally through workbook

    Hi and welcome to the forum (and no, you didnt run fowl of any rules)

    without seeing what your data/workbook looks like, this is a guess, but it looks like "timein" and "cases" are range names. These range names probably have a finite start and end range, and you are entering data that is outside that range.

    When you say "when I move to the 2nd page" do you mean another tab/worksheet?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,630

    Re: Formula only calculating sum from first page, not universally through workbook

    Did you check the name manager to see if timein is a multi-sheet range like "sheet1:sheet5!A1:A20"?
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    04-20-2013
    Location
    Normandy
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula only calculating sum from first page, not universally through workbook

    Sorry, to clarify I mean to scroll down beyond what would a A4 sheet. I have looked into the names and it does indeed seem that it has been defined to only work for the cells on the first page. How could I extend it down? There are titles separating the cells needed so would I have to extend the formula with an , and add the cells between? The worksheet is laid out 500 cells down

    Cases was = ='DEL-DOC'!$F$3:$F$25

    Thank you for your help.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula only calculating sum from first page, not universally through workbook

    If the titles are text then they won't affect the calculation since you're testing for numeric conditions and doing a conditional sum.

    5...............5
    2...............4
    1...............3
    3...............5
    text........text
    7...............2
    1...............5

    Basically, this is what you're doing:

    =SUMPRODUCT(--(A2:A8>=1),--(A2:A8<=3),B2:B8)

    The text entries won't have any affect on the formula result.

    So, you just need to extend your ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    04-20-2013
    Location
    Normandy
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula only calculating sum from first page, not universally through workbook

    The titles are part of the formula as when I rearrange the formula to start within the cell directly underneath where I input the numbers the formula breaks down. So I would then need to extend the range of the name cases, but when I do that, even to one more page, again the formula breaks down. Am I missing something or is it because there is more than one variable that I need to change along with the name?


    Also, I cannot see timein on the name manager, only cases. Is timein an integrated part of excel in this case?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula only calculating sum from first page, not universally through workbook

    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  8. #8
    Registered User
    Join Date
    04-20-2013
    Location
    Normandy
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula only calculating sum from first page, not universally through workbook

    Thank you, I will post a copy tonight.

+ 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