+ Reply to Thread
Results 1 to 6 of 6

Offset and vlookup for chart trending

  1. #1
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Offset and vlookup for chart trending

    Hello, I don't know how to explain this but I will try. I'm using an offset code (=OFFSET(Sheet1!$N$2,COUNT(Sheet1!$N:$N),0,-12,1)) for Dynamic Rolling Chart, meaning the chart displays the last 12 weeks of the column. However, I need to some kind of vlookup code that works together with rolling chart. Meaning, if I have a name x the vlookup would find the last 12 weeks of the name x. Here is the picture and the file.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Offset and vlookup for chart trending

    revise your formula to locate anchor cell for offset.

    =OFFSET(INDEX(Sheet1!$N$2:$V$2,MATCH(Sheet1!$A$2,Sheet1!$N$2:$V$2,0)),COUNT(Sheet1!$N:$N),0,-12,1)

    If the length of your total sales data can vary by department then you will need to modify the count part of the formula as well
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Re: Offset and vlookup for chart trending

    It's working! Thank you so much!
    Last edited by AliGW; 04-11-2018 at 07:49 AM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Re: Offset and vlookup for chart trending

    What if its a pivot table? Can I use the code like this?

    =OFFSET(INDEX(Sheet1!pivottable1,MATCH(Sheet1!$A$2,Sheet1!pivottable1)),COUNT(Sheet1!$N:$N),0,-12,1)
    Last edited by AliGW; 04-11-2018 at 07:49 AM. Reason: Unnecessary quotation removed.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Offset and vlookup for chart trending

    you would need to specify the row or column that has the data rather than just the whole pivot table

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,867

    Re: Offset and vlookup for chart trending

    SovietChild - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Trending DDE
    By Robertluckett in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2013, 03:51 PM
  2. Trending Data
    By zhollett in forum Excel General
    Replies: 2
    Last Post: 08-13-2010, 12:50 PM
  3. How to get the most accurate trending
    By coolzero in forum Excel General
    Replies: 15
    Last Post: 07-22-2010, 05:16 PM
  4. Value in a row are trending up or down?
    By Coume in forum Excel General
    Replies: 4
    Last Post: 03-23-2010, 04:30 PM
  5. Trending in Graphs
    By NatKatDWE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-22-2008, 12:48 PM
  6. Trending data
    By asim in forum Excel General
    Replies: 1
    Last Post: 03-28-2007, 04:38 PM
  7. Trending checkboxes?
    By Tre_cool in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2006, 10:03 AM
  8. Series Trending
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2005, 05:00 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