+ Reply to Thread
Results 1 to 22 of 22

Creating an Average

  1. #1
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Creating an Average

    Hello!

    I need to create a running average basically.
    This is going to be a different length for each trial though, and will need to reset when a certain column (Lag1) is equal to 0.

    I generally will need the CORRECTNESS column to average down and then when Lag1 equals 1 to stop and start over with the averaging process.

    Lag1 CORRECTNESS
    0 0
    1 1
    1 0
    1 1
    1 1
    1 0

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Creating an Average

    Can you attach a sample workbook with a mock-up of what you expect as your result.

    Go Advanced -> Manage Attachments -> Upload

  3. #3
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    Here ya go.
    Attached Files Attached Files

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Creating an Average

    Why a word document?

  5. #5
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    I didn't think it mattered, so I just took a screenshot and pasted into a word doc.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    Since you have the workbook you can upload an Excel file the same way. Saves retyping data and if you already have some formulas in play it helps to interpret what you are trying to do.
    Dave

  7. #7
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    I don't currently have any formulas in play that would be displayed here. This is a very small subset of the overall dataset.
    Thanks
    Attached Files Attached Files

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    I suspect we are going to need a larger data set, but try this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    So, here is what it is doing with a slightly larger section of my dataset.
    Everything is working well, but it is not completely resetting after the Lag1 variable is equal to 0.
    The new variable does equal 0 at that point, which is great, but I would need the average to restart as well.
    In this example that would mean that the first slot after the Lag1 restarts should be 1.
    Attached Files Attached Files

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 07-18-2018 at 02:15 AM.

  11. #11
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    Great! That worked beautifully.

    I am getting an error that says the formula is omitting adjacent cells.
    Is that fine?

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    Without seeing it I can not comment.

    See where the formula is entered in column D of the attached.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    It appears as though yours is coming up with the same comment in your new column D.

  14. #14
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    That's not happening at my end.

    In which cell / row does it occur?

    Edit If you are talking about the little green "triangles" in the upper left corner those are because under Options > Formulas > Error checking rules the "Formulas which omit cells in a region" is likely checked. Try unchecking that and see if it persists.
    Last edited by FlameRetired; 07-18-2018 at 11:16 PM.

  15. #15
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    That is exactly what was happening. Thank you so much!

  16. #16
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    You are welcome.

  17. #17
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    So I will need your assistance yet again.

    I am using this formula that you figured out for me on my second dataset and I am getting values that are outside of the realm of possibility for an average and am not sure why.
    I tried using the exact formula elsewhere and it works as intended. Hopefully I can get your assistance again.

    I attached the document to this post. It is on sheet 2 and you have to scroll over to find the data that I left (in order to keep my other formulas in tact).
    Attached Files Attached Files

  18. #18
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    There is no Sheet2 in the upload. Any chance it's not the right file?

  19. #19
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    Okay. Well hopefully this works
    Attached Files Attached Files

  20. #20
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    In the previous examples all the CORRECTNESS sections breaking on Lag1=0 started with 0. The sums were always less than the number of rows. That is not the case with this sample. They all start with 1. In fact the only CORRECTNESS values are all 1s.

    Perhaps I misunderstood the first example set. If you replace that formula with
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    you will get all 1s for the averages (except at the Lag1=0 rows). This seems unlikely.

    What results were you expecting?

  21. #21
    Registered User
    Join Date
    07-17-2018
    Location
    Kansas
    MS-Off Ver
    OFFICE 365 PRO PLUS
    Posts
    14

    Re: Creating an Average

    This task is significantly easier, which is what would have been expected, than the first dataset that you saw.
    It is not surprising that there are a large amount of 1s in this average column. When I look further down the list there are people who did not have a perfect run with this task, but it is by far not as common as it was in the previous dataset.

    Thank you so much! That formula worked just great!

  22. #22
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Creating an Average

    You are welcome.

    Edit By-the-way that formula is resource heavy. It takes a long time to calculate that much data. If that is always the case ... or there are larger sets than that ... I would recommend some helper columns to limit the recalculations load.
    Last edited by FlameRetired; 07-19-2018 at 11:35 PM.

+ 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] Creating a rolling average
    By Bradleypike in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-14-2017, 10:47 AM
  2. [SOLVED] Creating Template with average without getting #DIV/0! error
    By Sundarvlr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2013, 07:00 PM
  3. Excel 2007 : Creating Pivot for Average
    By jacob.raj in forum Excel General
    Replies: 1
    Last Post: 01-18-2011, 06:01 PM
  4. Creating a running average
    By jlind05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2009, 11:15 PM
  5. creating an average?
    By loopiloo in forum Excel General
    Replies: 2
    Last Post: 07-22-2006, 02:24 PM
  6. [SOLVED] Creating an AVERAGE next to the top of a selection
    By Jesse Custer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2005, 01:35 PM
  7. help creating average formula
    By Deb in forum Excel General
    Replies: 7
    Last Post: 05-13-2005, 01:06 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