+ Reply to Thread
Results 1 to 4 of 4

Offset named range and measure the average of the named range

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Offset named range and measure the average of the named range

    Hello

    I have a named range called "YEARMONTHRolling12" that is dynamic code for selecting the last twelve last months.
    =Offset(($F$2;0;CountA($G$2:$S$2);1;-12)

    This works and when I write it in a cell it extracts the correct values in the cell like this:
    2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2101

    Below this values are values that I would like to count the average value from.
    2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2101
    1233 1233 1231 2323 2424 2424 2313 2312 2323 2314 2323 2323

    I was thinking I should be able to use this formula and simply offset the dynamic range and calculate the average.
    =average(Offset(YEARMONTHRolling12;Row(B3)-2;0;1;1))
    However, the formula returns the value below the first column (2002 = 1233). I excepted the average of the twelve inputs.

    What have I done wrong? Any ideas?

    Everything written is example. See the attached file and see the cell F3 for the average formula that returns the wrong result. (Swedish original)


    Kind regars
    Anders
    Attached Files Attached Files
    Last edited by a94andwi; 02-08-2021 at 10:46 AM.

  2. #2
    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: Offset named range and measure the average of the named range

    Amend to:

    =AVERAGE(OFFSET(ÅRMÅNSenasteTolv,ROW(B3)-2,,,))

    you were confusing it by giving it a RANGE (12 cells) from ....SeansteTolv and then telling it to look at a range 1 cell wide.
    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

  3. #3
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Re: Offset named range and measure the average of the named range

    Sometimes it is too easy..... Big thanks!!

  4. #4
    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: Offset named range and measure the average of the named range

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

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

+ 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. Listbox displaying named range B but Adding named range A to cell
    By ikkenieikke in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-05-2018, 02:27 PM
  2. [SOLVED] Compare cells to named range and create new sheets using related named range
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2015, 03:35 PM
  3. Offset named range
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-18-2014, 11:12 PM
  4. [SOLVED] Determine what Named Range the Target Address is and return Named Range Name
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2012, 10:49 PM
  5. Named range offset by row
    By Macdave_19 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-05-2008, 11:45 AM
  6. named range row offset
    By barbetta3141@yahoo.com in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2006, 08:45 PM
  7. named range / offset
    By Gixxer_J_97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2005, 06: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