+ Reply to Thread
Results 1 to 14 of 14

Cumulative Actual auto sum within a table

  1. #1
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Cumulative Actual auto sum within a table

    Capture.PNG

    So above is the table that i am working with, and im trying to get this to be more automatic so that it does the calculations without me having to interact with it. So i'm looking at the Cumulative actual column which is worked out from the hours booked so for each line you add up the previous amounts including that row and divide by how many data sets there are.For example for week 2 it would be 18.21 + 45.59 / 2. For week 3 it would be 18.21 + 45.59 + 38.46 / 3 and so on. Also taking into mind that the data is in a table and i will be taking rows out/hiding them and would need it to not include those hidden rows. Hopefull this makes sense so if i were to unselect week 7 i would need the sum on row 8 to not include that and to divide by 7 as there would only be 7 sets of data in that sum

  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: Cumulative Actual auto sum within a table

    Welcome to the forum!

    Will you please attach a sample Excel workbook?

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    Hopefully should have an attatched workbook
    Attached Files Attached Files

  4. #4
    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: Cumulative Actual auto sum within a table

    You have not included any expected results added manually in your workbook. Where do you want these results to appear?

  5. #5
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    Im looking for the results of the cumualtive actual to be entered into the end column (Column4, forgot to rename it) the data that is in there currently is what i have worked out manually and entered into there but that is ideally where i would like the data to be worked out

  6. #6
    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: Cumulative Actual auto sum within a table

    For some reason I cannot unhide the hidden rows - please unhide them and post the workbook again.

  7. #7
    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: Cumulative Actual auto sum within a table

    Never mind!

    This in H3 copied down:

    =SUBTOTAL(101,F$3:F10)

  8. #8
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    I've copied that down but it seems like after row 12 it repeats itself, is it doing the correct calculation? As i'd have thought that the first row should match what is in the hours booked column as it would be 46.54/1 but is coming back with 32.15543

  9. #9
    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: Cumulative Actual auto sum within a table

    Please attach the workbook where you have done this with ALL rows unhidden.

    Check that you have copied it correctly:

    =SUBTOTAL(101,F$3:F10)

    Have you missed the dollar sign?

  10. #10
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    Here should be where i have copied all the datadown and the results should be shown
    Attached Files Attached Files

  11. #11
    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: Cumulative Actual auto sum within a table

    My mistake. Try this in H3:

    =SUBTOTAL(101,F$3:F3)

    SUBTOTAL 101 averages visible rows.

  12. #12
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    Excellent i believe , that this is what I was looking for. Thank you very much

  13. #13
    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: Cumulative Actual auto sum within a table

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  14. #14
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: Cumulative Actual auto sum within a table

    Hi im not sure if i would need to make another ticket/post for this but was curious if i could get help with something else.

    On another page of my spreadsheet I use a custom function in VBA to fetch the last piece of data in a column and show it to me.
    Now that i am using a table for my data this function doesn't work exactly how i would like as i am wanting it to show the last visible column so if i had week 10 hidden on the table then it would pull the data from week 9

    Belowis the code i use to get me the lastincoulmn:

    Function LASTINCOLUMN(rngInput As Range)
    Dim WorkRange As Range
    Dim i As Long, CellCount As Long
    Application.Volatile
    Set WorkRange = rngInput.Columns(1).EntireColumn
    Set WorkRange = Intersect(WorkRange.Parent.UsedRange, WorkRange)
    CellCount = WorkRange.Count
    For i = CellCount To 1 Step -1
    If Not IsEmpty(WorkRange(i)) Then
    LASTINCOLUMN = WorkRange(i).Value
    Exit Function
    End If
    Next i
    End Function
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 09-08-2017, 07:30 AM
  2. cumulative pivot table
    By nikish2611 in forum Excel General
    Replies: 0
    Last Post: 01-29-2016, 07:55 PM
  3. How to generate table from cumulative table?
    By pejaemma25 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-10-2014, 02:16 AM
  4. [SOLVED] using sumifs() to compare cumulative totals for actual versus budget based on financial pe
    By Woodstock in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 12-12-2012, 08:26 AM
  5. Cumulative addition from table
    By Africa in forum Excel General
    Replies: 0
    Last Post: 05-16-2012, 10:20 AM
  6. Cumulative Frequency Table and Pivot Table
    By ryue65 in forum Excel General
    Replies: 2
    Last Post: 12-10-2009, 04:50 PM
  7. Value of the actual Auto Filter
    By Hans Engen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-22-2005, 09:06 AM

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