graphs with variables challenge

music4fun

New Member
Joined
Jul 20, 2007
Messages
11
HELP! :eek:
I have an excel workbook with several sheets that contain performance data for a changing
number of empolyees. Each employee remains in the same row and all the data on the following sheets is lined up. The data grows horizontally (each week) and the employees grow vertically.
I created a sheet with graphs pertaining to each performance metric (graph sheet) and related to an employee.
My first attempt was to have an extra sheet for each employee but excel ran out of characters. Also I wanted to have the option to change the
date range, which I had to do manually (a ton of work).
So I added another sheet that would automate that process.
On this sheet I wanted to have the option of choosing a specific employee and a specific date range for each performance metric.
I figured out how to operate with drop downs and extract with =CONCATENATE("=attend!$",C22,"$",D4,":$",C24,"$",D4)
the actual string =attend!$J$18:$Q$18
that is required for the chart values and xlabel.

That's where I am with my little macro

Sub AgentData()
'
Dim label As Variant
Dim CSATval As Variant
Dim CSATlabel As Variant

'name of the agent
label = ActiveSheet.Range("b3").Value

'graphs variables: values and x labels


CSATval = ActiveSheet.Range("C18").Value
CSATlabel = ActiveSheet.Range("C19").Value


'copy the template and changing the name of the sheet
Sheets("agent").Select
ActiveSheet.Copy after:=Sheets(Sheets.Count)
ActiveSheet.Name = label
'first chart: CSAT
ActiveSheet.ChartObjects("Chart 6").Activate
'here starts the grief
ActiveChart.SeriesCollection(1).XValues = CSATval
ActiveChart.SeriesCollection(1).Values = CSATlabel

'HELP!

End Sub

and when it runs it can't change the value for the x and the label for the chart.
"unable to set the xvalues property of the series class"
Can somebody please help me with that?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,378
Messages
6,119,188
Members
448,873
Latest member
jacksonashleigh99

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