+ Reply to Thread
Results 1 to 12 of 12

[Solved] Averaging multiple non-consecutive cells

  1. #1
    Registered User
    Join Date
    03-14-2017
    Location
    Shakopee
    MS-Off Ver
    2013
    Posts
    4

    Question [Solved] Averaging multiple non-consecutive cells

    Hello!

    I am new to this forum, but have been using Excel for some time now. I came across a scenario today however which stumped me, and was hoping that perhaps someone on here might have a solution!

    I am attempting to get an average of multiple non consecutive cells, ignoring anything that is equal to '0'. Each of my cells is 10 cells apart. I've tried a few different formulas, but none of them have worked yet. I have well over 100 cells total that I'm trying to apply this formula too, screencap below for reference!

    Excel Snippet.png

    These are the formulas I've tried:
    =Average(B9,B20,B31,B64,B75,B86,B97,B108,B141,B152,B163,B174,B185,B218,B229,B240,B251,B262,B295,B306)
    ^doesn't take out zeros

    =SUM(Log_On_Bradley)/COUNT(Log_On_Bradley)
    ^Same as above (Where "Log_On_Bradley" is just a named range referencing the above cells)

    =SUM(Log_On_Bradley)/COUNTIF(Log_On_Bradley, ">0")
    ^Throws an error

    =AVERAGEIF(B8,B19,B30,B63,B74,B85,B96,B107,B140,B151,B162,B173,B184,B217,B228,B239,B250,B261,B294,B305, ">0")
    ^Throws an error for too many arguments

    Thanks in advance for any help!

    Leah

    Last edited by jaderae; 03-15-2017 at 12:13 PM. Reason: Solved

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Averaging multiple non-consecutive cells

    Maybe?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-14-2017
    Location
    Shakopee
    MS-Off Ver
    2013
    Posts
    4

    Re: Averaging multiple non-consecutive cells

    Doesn't that sum ALL of column B though that's over zero? I only need every 11th cell figured into the formula: i.e. B5, B16, B27...

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Averaging multiple non-consecutive cells

    Ah..yes sorry about that.
    Maybe search for , "Average every nth row"

  5. #5
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Averaging multiple non-consecutive cells

    Hi -

    Are you really trying to average every nth cell or are you trying to average each employee's login time that is not zero?
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

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

    Re: Averaging multiple non-consecutive cells

    Are all of these "tables" on the same worksheet? You should have attached a sample. We cannot even see the column and row headers in the pics.
    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

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

    Re: Averaging multiple non-consecutive cells

    sol'n deleted....
    Last edited by protonLeah; 03-14-2017 at 07:14 PM.

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

    Re: Averaging multiple non-consecutive cells

    If everything is on one sheet, maybe:
    =SUMPRODUCT(--(A:A=z1),(B:B))/SUMPRODUCT(--(A:A=z1),--(B:B>0))
    z1=address of first name in list of names in the red box.
    Last edited by protonLeah; 03-14-2017 at 10:07 PM.

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Averaging multiple non-consecutive cells

    For averaging non-consecutive cells ignoring zeroes you can use this type of formula:

    =SUM(B3:B7,D3:D7,F3:F7)/INDEX(FREQUENCY((B3:B7,D3:D7,F3:F7),0),2)

    see explanation here
    Audere est facere

  10. #10
    Registered User
    Join Date
    03-14-2017
    Location
    Shakopee
    MS-Off Ver
    2013
    Posts
    4

    Re: Averaging multiple non-consecutive cells

    Thank you for the responses everyone!

    I have attached the worksheet that I am dealing with to this post. To answer the question above, yes I am trying to average every 11th cell that doesn't contain zero, but those cells also correspond to an employee. So it's every 11th cell without a zero entry, or every log in time for Folley, Benjamin that is not equal to zero.

    Hope that helps, thanks again for the responses!
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-14-2017
    Location
    Shakopee
    MS-Off Ver
    2013
    Posts
    4

    Re: Averaging multiple non-consecutive cells

    @daddylonglegs I was able to tweak this formula to work for me! Thank you so much, you have saved me hours of work. I really appreciate that you linked to the explanation so that I know why it worked too.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Averaging multiple non-consecutive cells

    Why not ..????

    =AVERAGEIFS(B:B,A:A,K15,B:B,">0")

+ 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. Averaging consecutive groups of cells
    By ptr_7 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2016, 01:17 PM
  2. Averaging Data not in consecutive cells with data in-between
    By BL84 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2015, 03:06 AM
  3. [SOLVED] Averaging cells from multiple Worksheets
    By dusto in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-27-2014, 05:49 AM
  4. Automatically averaging consecutive data in a column
    By fidu_k in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-10-2014, 03:02 PM
  5. Help Averaging Numerous Consecutive Cell Groups (Data Analysis!)
    By Needshelp012 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-28-2013, 03:41 PM
  6. Formula for Averaging multiple cells on multiple pages
    By blakeandsteph in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-24-2013, 09:34 PM
  7. Averaging cells over a varying quantity of multiple sheets
    By rpm77 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-20-2010, 06:04 PM

Tags for this Thread

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