Named Ranges

gage25

New Member
Joined
Oct 16, 2002
Messages
16
I have created some named ranges in a workbook, and are using them to create graphs using a macro. I have successfully created graphs and macros using the named ranges, until I reached the point in the spreadsheet where it has attained double-lettered columns (i.e. AA, AB). The macros worked great until I reached these columns, and now I am getting a "user-defined or object-defined error". Is there any way to get around this? I have checked the macros and the named ranges, and the absolute only difference is the column headings.

Any ideas? Solutions would be greatly appreciated.

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

gage25

New Member
Joined
Oct 16, 2002
Messages
16
Here is the code that is giving the error:

ActiveChart.SetSourceData Source:=Sheets("Quality Control").Range("CSZ1,CSZ2,CSZ3,CSZ4,CSZ5") _
, PlotBy:=xlColumns

where:
CSZ1 = column Y
CSZ2 = column Z
CSZ3 = column AA
CSZ4 = column AB
CSZ5 = column AC

Now, if only one of those ranges is used (i.e. only CSZ4 (column AB)), then it works like a champ, but using all three for some reason gives an error.

I have tried re-recording the macro, but i get the same error each time.
 

Forum statistics

Threads
1,144,124
Messages
5,722,626
Members
422,448
Latest member
AugyIA

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
Top