+ Reply to Thread
Results 1 to 8 of 8

Averaging rows by irregular values in Column X

Hybrid View

  1. #1
    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
    53,048

    Re: Averaging rows by irregular values in Column X

    Hi, welcome to the forum

    Without adding a helper (which would make it MUCH simpler), try this ARRAY formula, copied down...
    =SUMPRODUCT(IF(ROUND($F$2:$F$326,5)=ROUND(F2,5),$C$2:$C$326))/SUMPRODUCT(COUNT(IF(ROUND($B$2:$B$326,5)=ROUND(B2,5),$B$2:$B$326,"")))
    If you want to only show the 1st instance of a series, use this from the SECOND row down (if you put it inthe 1st row, it will give an error)...
    =IF(ROUND(B2,5)=ROUND(B1,5),"",SUMPRODUCT(IF(ROUND($F$2:$F$326,5)=ROUND(F2,5),$C$2:$C$326))/SUMPRODUCT(COUNT(IF(ROUND($B$2:$B$326,5)=ROUND(B2,5),$B$2:$B$326,""))))

    However, if you are able to add a helper column, use this (I used D), then put this in D2...
    =ROUND(B2,5)
    and then put this in E2...
    =IF(D2=D1,"",AVERAGEIF($D$2:$D$326,D2,$C$2:$C$326))
    both copied down
    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

  2. #2
    Registered User
    Join Date
    12-04-2014
    Location
    Colorado, USA
    MS-Off Ver
    2010, 2013
    Posts
    7

    Re: Averaging rows by irregular values in Column X

    Hi FDibbins and thanks for the help!

    I added in the helper column, but using the Round function on time values was throwing things off (with conversion of base 10 numbers to time being somewhat convoluted). I changed it to an MROUND(B2,0.00001157407) to make it round to the whole second and it works great!

    Also, is there an easy way to go about condensing the rows and outputing to a new worksheet? Adding additional columns is less of an issue with my HK files but .simdata csv files have a large number of columns that I will need to get an average for.

    Thanks again!

+ 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 values from common rows
    By topazsparrow in forum Excel General
    Replies: 3
    Last Post: 05-29-2012, 06:47 PM
  2. Converting single column into multiple rows with irregular data
    By longhornpete in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2012, 10:27 AM
  3. Averaging values from rows with identical column
    By Broccoli in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2012, 07:51 PM
  4. Averaging values and replacing rows
    By eila90 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2010, 08:16 PM
  5. Averaging values in different rows
    By pittopitto in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2007, 10:46 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