Hi ,
Is it possible to store the offset values to an dynamic array and then transfer array to an named range....so that i can use it as my chart data source.
Set legendarea = wksout.UsedRange.Rows(50).Cells(wksout.UsedRange.Columns.Count).Offset(0, 4)
legendarea.Value = "Legend"
For indlegend = 1 To numrules
If strLegend(indlegend) <> "" Then
Set legendarea = legendarea.Offset(1)
legendarea.Interior.color = lngColCode(indlegend)
legendarea.Offset(0, 1).NumberFormat = "@"
legendarea.Offset(0, 1).Value = strLegend(indlegend)
End If
If blockname = "Verdict" Then
NumberOfRows = wbkInput.Sheets(1).Range("A65536").End(xlUp).Row
Actualrows = NumberOfRows - 1
Set legendareanum = legendarea.Offset(0)
colour = legendarea.Interior.color
counter = 0
For Each c In wksout.UsedRange
If c.Interior.color = colour Then
counter = counter + 1
End If
Next c
legendareanum.Offset(0, 4).NumberFormat = "0.0"
legendareanum.Offset(0, 4).Value = counter / Actualrows * 100
End If
Next
I want to use legendarea.Offset(0, 1).Value = strLegend(indlegend) as my Y axis value and legendareanum.Offset(0, 4).Value = counter / Actualrows * 100
as my X axis value.....I need to plot a Stacked 2D bar chart using this values.But as these ranges are dynamic,i thot to store in a array and then copy over to one fixed range.
have also posted at http://www.ozgrid.com/forum/showthread.php?t=157897
but couldnt get any reply.....
Regards
Ashesh
Bookmarks