Sparklines with Dynamic Data and Locations

articzap

New Member
Joined
Nov 2, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
What I thought would be pretty simple is absolutely destroying me, and I can't figure it out.

I have a spreadsheet that uses dynamic arrays to update a dashboard based on some drop down selections. I want the sparkline data and location to update according to these dynamic arrays length. I've tried setting the named range to the dynamic array (U7#), but the sparkline always defaults to the length of they dynamic array at the time of entering the named range in the boxes. It does not keep the named range.

Any thoughts without having to use VBA would be helpful.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You said:
I want the sparkline data

sparkline data ??
What is sparkline data?
 
Upvote 0
So here is the before. Named ranges entering to the sparkline data fields.
named range.png

After hitting 'OK' and reopening the sparkline data fields, the named ranges are gone, and its back to a static field. This also happens if I used '$U$7#' instead of 'SPARKLINES'.
after range.png


I have attached a sample copy of my workbook for everyone to see, and if they can come up with a better solution.

easyupload.io
Password: test
 
Upvote 0
OK Thanks. I have never used Sparklines or heard of them.
I Will watch this thread to see what I can learn.
 
Upvote 0
Maybe
VBA Code:
' Sparklines will Appear in J3:J7, Source Range is C3:I7
' 3 Options for Sparklines - Line, Column or Win/Loss
With Range("$J$3:$J$7").SparklineGroups  ' Where Sparklines will Appear
  .Add Type:=xlSparkLine, SourceData:="Sheet10!C3:I7"               ' Line
  .Add Type:=xlSparkColumn, SourceData:="Sheet10!C3:I7"             ' Column
  .Add Type:=xlSparkColumnStacked100, SourceData:="Sheet10!C3:I7"   ' Win/Loss
End With

' Sparklines will Appear in Named Range Called SparklinesAppear, Source Range is Named Range MyRange
With Range("SparklinesAppear").SparklineGroups  ' Where Sparklines will Appear
  .Add Type:=xlSparkLine, SourceData:="MyRange"
End With
 
Upvote 0

Forum statistics

Threads
1,223,631
Messages
6,173,465
Members
452,516
Latest member
archcalx

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