+ Reply to Thread
Results 1 to 8 of 8

Repeating the average multiple times

  1. #1
    Registered User
    Join Date
    07-30-2013
    Location
    Grimstad, Norway (Southern part)
    MS-Off Ver
    Excel 2010
    Posts
    48

    Repeating the average multiple times

    Hello,
    I want to repeat the average(=AVERAGE(A2:N4)) 3 times or n number of times as shown in the sheet. How many times, i.e. n is decided by the number of rows in a particular group(Eg: rows 2,3,4 is in one group, rows 5,6 is another group).
    Kindly help me.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Repeating the average multiple times

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    Please Login or Register  to view this content.

    In O2 Cell


    =AVERAGE(A2:N4)*MergedRows(A2)


    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Repeating the average multiple times

    A shorter version of code

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-30-2013
    Location
    Grimstad, Norway (Southern part)
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Repeating the average multiple times

    H
    THANK You.
    I tried.
    I am sorry, it didn't work. Isn't that possible to solve it only with formula?

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Repeating the average multiple times

    One supporting column was created

    if it is not you are looking for attach sample file with desired result
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Repeating the average multiple times

    Can I ask why you're wanting to use merged cells at all? You don't seem to be doing anything special inside those cells. Why not kill them and make the rows wider if you just want some extra space?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Repeating the average multiple times

    Oopss... Mis Interpreted your question

    Here is the revised solution

    Please Login or Register  to view this content.

    In O2 Cell

    =IFERROR(AVERAGE(Merged(A2,N2)),O1)


    Drag it down...

    Refer the attached file
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-30-2013
    Location
    Grimstad, Norway (Southern part)
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Repeating the average multiple times

    Hi everyone,
    I got solved it. All suggested methods worked. Great many thanks.

+ 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] Find specific value in array which appears multiple times and average all relative cells
    By nenadmail in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-24-2014, 04:18 PM
  2. Macro Loop – Find Specific Times, Extract Date, Average Values of Times
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-25-2010, 02:50 PM
  3. Repeating multiple cells a set number of times to print labels
    By Jenrich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-10-2009, 03:21 PM
  4. Repeating a number 3 times
    By bikersnm in forum Excel General
    Replies: 7
    Last Post: 05-12-2009, 04:02 AM
  5. Macro to help sort date - times and average similar times.
    By ferretydeath in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2008, 05:44 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