+ Reply to Thread
Results 1 to 6 of 6

Find last 12 values based on week number/year

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013/10/07/03
    Posts
    33

    Find last 12 values based on week number/year

    Good afternoon all,

    Sorry this is a somewhat lazy question to ask since i know ive done this before (many years ago). But i am trying to fill a table of the last 12 values for the purposes of creating dynamic charts. I remember last time i used named ranges, offsets etc etc but been too long to remember how.

    Ive attached a worksheet to explain it better.

    *Edit* I should probably mention, i want to be able to change cells C1 and C2 to update the values. Everything else wil be rather static.

    Any help would be greatly appreciated.

    Cheers,

    Pytheus
    Attached Files Attached Files
    Last edited by pytheus; 07-09-2014 at 10:24 PM.

  2. #2
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Find last 12 values based on week number/year

    Hi Mark,

    I've used the OFFSET and MATCH functions. Note that there are formulas in row 14 (above the table), do not remove them - I've colored them in white - These formulas are used by the formulas in the table.

    Refer enclosed workbook. Is this something you can work with?
    Attached Files Attached Files
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013/10/07/03
    Posts
    33

    Re: Find last 12 values based on week number/year

    Thats great Saarang84. Will work great with the real data. Appreciate your assistance.

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

    Re: Find last 12 values based on week number/year

    =INDEX($C$5:$BM$9,ROWS(C$15:C15),MATCH($C$2,$C$5:$BM$5,0)-12+COLUMNS($C15:C15))
    Enter the above formula in C15 and copy & Paste across
    Samba

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

  5. #5
    Registered User
    Join Date
    11-08-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013/10/07/03
    Posts
    33

    Re: Find last 12 values based on week number/year

    Thanks nflsales. Saarang84's worked great but yours was the answer i was actually expecting. Will keep it on hand in case it turns out to be more useful for my purposes.

  6. #6
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Find last 12 values based on week number/year

    Quote Originally Posted by nflsales View Post
    =INDEX($C$5:$BM$9,ROWS(C$15:C15),MATCH($C$2,$C$5:$BM$5,0)-12+COLUMNS($C15:C15))
    Enter the above formula in C15 and copy & Paste across
    Hi Siva,

    It seems your formula doesn't check the combination of week number and the year together.
    For e.g., when VMC Week Number (C2) contains 52, it returns values only from column M onwards (for the past 12 months), it doesn't distinguish between column M and BM.

+ 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. week number based on year start 01/10
    By tony0710 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-02-2014, 12:21 PM
  2. formula to identify week number based on date ranges and add values
    By Lmendez in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-18-2014, 12:55 PM
  3. [SOLVED] Provide every other Tuesday based on odd or even week number of year
    By KJH34 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2012, 07:31 PM
  4. Year and week, adding zero before week number
    By randalino in forum Excel General
    Replies: 1
    Last Post: 06-23-2009, 10:34 AM
  5. [SOLVED] Calculating a Date Based on Year, Week Number and Day of the Week
    By amy in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 11:42 AM

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