I was referring to your use of F2:H2 - which is why I changed it.![]()
I was referring to your use of F2:H2 - which is why I changed it.![]()
Good luck.
I'd greatly appreciate any help ....
this macro is meant to create a spark line for the selected range and put the results in the (row-2) range
[result on this row.......]
percent 11-Q1 11-Q2 11-Q3
a.Zero 1% 2% 3%
b.1-2 2% 3% 4%
c.3-5 1% 2% 3%
d.6-10 2% 3% 4%
e.>10 1% 1% 1%
I would select 1%...3% and the next 5 rows
I would want to put the sparklines in [result on this row.......]
thanks
Mark
![]()
Sub ADD_SPARK_FOR_SELECTION() ' Dim LINE As SparklineGroup Dim ws As Worksheet Dim rng As Range Dim Rng2 As Range Set ws = current.Sheet ' KEEP GETTING OBJECT REQUIRED ERROR strow = Selection.Row ROWCT = Selection.Rows.Count stcol = Selection.Column colct = Selection.Columns.Count addr = Selection.Address ' IT IS MEANT TO USE THE SELECTION ON THE SHEET AND PUT RESULTS IN TWO ROWS BEFORE Set LINE = ws.Range(Cells(strow - 2, stcol), Cells(strow - 2, stcol + colct - 1)).SparklineGroups.Add(Type:=xlSparkLine, SourceData:=rng) Selection.SparklineGroups.Item(1).SeriesColor.ThemeColor = 5 Selection.SparklineGroups.Item(1).SeriesColor.TintAndShade = -0.499984740745262 Selection.SparklineGroups.Item(1).Points.Negative.Color.ThemeColor = 6 Selection.SparklineGroups.Item(1).Points.Negative.Color.TintAndShade = 0 Selection.SparklineGroups.Item(1).Points.Markers.Color.ThemeColor = 5 Selection.SparklineGroups.Item(1).Points.Markers.Color.TintAndShade = -0.499984740745262 Selection.SparklineGroups.Item(1).Points.Highpoint.Color.ThemeColor = 5 Selection.SparklineGroups.Item(1).Points.Highpoint.Color.TintAndShade = 0 Selection.SparklineGroups.Item(1).Points.Lowpoint.Color.ThemeColor = 5 Selection.SparklineGroups.Item(1).Points.Lowpoint.Color.TintAndShade = 0 Selection.SparklineGroups.Item(1).Points.Firstpoint.Color.ThemeColor = 5 Selection.SparklineGroups.Item(1).Points.Firstpoint.Color.TintAndShade = 0.399975585192419 Selection.SparklineGroups.Item(1).Points.Lastpoint.Color.ThemeColor = 5 Selection.SparklineGroups.Item(1).Points.Lastpoint.Color.TintAndShade = 0.399975585192419 End Sub
Last edited by arlu1201; 04-18-2014 at 05:09 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks