Dynamic Year-To-Date Sparkline based on week chosen from Dashboard.

theexcelcrowd

New Member
Joined
Jul 22, 2013
Messages
9
Hello,
I'm quite stuck with this issue and lost on what should go into the data range for the sparkline while using the Offset function as my reference value is in another workshet and combining vlookups in Offset is leaving me confused.

In my dashboard worksheet, I have a list [validation] made up of weekly dates [week ending on]. After the user selects a particular week from the drop-down, I want to show a sparkline chart that shows the Year-To-Date trend in clicks till the chosen date.
The weekly data is within a range in another worksheet where I have the summary date. This would look something like:
Column A Column B
Week Ending Clicks
7-Jan-2016 50
14-Jan-2016 100
21-Jan-2016 50

If my chosen period is for week ending 7Jan [from dashboard], the sparkline should be a dot.
If I choose 14th Jan, the sparkline should have two data points. If I choose 21th Jan, the sparkline should have three data points.

Thanks!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Use this formula against your dashboard validation selection (F4) and validation list (A:A) to return the index of the selected value:
Location: Sheet2 H4
Formula: =MATCH(F4,A:A,0)

Create a named range in your dashboard worksheet that pulls data from your WeeklyData worksheet,:
Name:
Formula: =OFFSET([WeeklyData.xlsx]Sheet1!$B$1,0,0,Sheet2!$H$4,1)

Use
Formula: =Weekly
as the Data Range for your sparkline
 
Upvote 0
<code style="font-family: monospace, monospace; margin: 0px 2px; border: 0px; border-radius: 2px; word-break: normal; display: block; font-size: 1em; line-height: 1.42857em; padding: 0px !important; background-color: transparent;">Hi,
I asked this in www.reddit.com/r/excel and got a suggestion to use match at the end as the lookup value is in another sheet.
=OFFSET($B$2,0,0, MATCH($D$2, $A$2:$A$50, 0), 1)
</code>
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,451
Members
452,514
Latest member
cjkelly15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top