+ Reply to Thread
Results 1 to 9 of 9

Dynamic Sparklines

  1. #1
    Registered User
    Join Date
    12-23-2014
    Location
    leeds
    MS-Off Ver
    2010
    Posts
    7

    Dynamic Sparklines

    Hello,

    I can create Sparklines without issue and understand that I need to apply the offset function but that is where I come undone.
    • Row A includes dates
    • Row B includes the requisite data


    I would like the sparkline to reflect trends in accordance with the last 30 days only, disregarding the data before last 30 days.

    Can anyone suggest what function I should apply? If my explanation isn't overly clear please let me know, happy to attach a document if necessary.

    Sal

  2. #2
    Registered User
    Join Date
    12-23-2013
    Location
    Gurgaon
    MS-Off Ver
    Excel 2013
    Posts
    36

    Re: Dynamic Sparklines

    Hi Salvucio,

    I will be happy to help you but I suggest you to attach a document so that research can be done
    Maitray,

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dynamic Sparklines

    Here is one way of doing this:

    Select a range of cells that will hold the result of the following formula which is an array formula for the whole range. For example select C2:C32 (for 30 days) and enter this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Make sure to enter with Ctrl + Shift + Enter.

    This will produce a listing of 30 values. This range of 30 cells with the values is what you will enter in the Sparklines Data Range.

    This will produce the Sparklines chart for the 30 days.

    Explanation of formula

    $A$2 is where the dates are starting in column A.

    MATCH(TODAY()-30 is the rows offset from today's date in column A it is looking for a date equal to today - 30.

    $A$2:$A$300 is the range of cells where the dates are.

    1 is the offset of 1 column making the column to return values from column B

    30 is the height of the array in rows from which to return values.

    1 is the width of the array from which to return values.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    12-23-2014
    Location
    leeds
    MS-Off Ver
    2010
    Posts
    7

    Re: Dynamic Sparklines

    Attachment 369888

    Thanks @ newdoverman for the really detailed response. Unfortunately it didn't work. Most likely because my initial post wasn't thorough enough.

    I've attached the document template i use in attempt to add more context.

    Sal

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dynamic Sparklines

    Your attachment to message #4 doesn't work. Can you upload a workbook instead of a picture.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Registered User
    Join Date
    12-23-2014
    Location
    leeds
    MS-Off Ver
    2010
    Posts
    7

    Re: Dynamic Sparklines

    Hopefully that should have worked. Manually mocked up the before/after.

    Thanks

    Sal
    Attached Files Attached Files

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dynamic Sparklines

    I have given you two choices for the Spark Lines. The choice that I have in the After worksheet takes data from Sheet2 and covers 30 dates of data (not 30 calendar days but 30 data entry dates) The second choice is 30 days...Take your choice.

    The RED shaded area on Sheet2 is important to be left alone. The formulae there are very sensitive to changes.

  8. #8
    Registered User
    Join Date
    12-23-2014
    Location
    leeds
    MS-Off Ver
    2010
    Posts
    7

    Re: Dynamic Sparklines

    Hi,

    Sorry was out of the yesterday so wasn't able to check, works perfectly and is exactly what i needed so thank you very much for your help here.

    Much appreciated.

    Sal

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dynamic Sparklines

    Glad it works for you. Thanks for the feedback.

+ 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] dynamic cell range for sparklines
    By coffee_man in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-10-2023, 05:28 AM
  2. Horizontal bar / sparklines?
    By C_Q in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-30-2022, 01:55 AM
  3. Sparklines on a graph for KPI's
    By dsciola in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-09-2014, 04:35 PM
  4. sparklines and 0 values
    By Paul-NYS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-19-2012, 09:24 AM
  5. Sparklines in Excel
    By sgriggins3 in forum Excel General
    Replies: 1
    Last Post: 06-12-2012, 05:46 PM

Tags for this Thread

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