LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 14
Default auto data source, removing null

I have a chart that is automatically generating a chart based on the data
imported into the spreadsheet, however, the number of rows of data is not the
same, so when the chart generates based on a selection that has more rows
selected than there is data for, it creates a very weird looking chart.

.Columns("A:B").Select
.Charts.Add
.ActiveChart.ChartType = xlColumnClustered
.ActiveChart.SetSourceData Source:=Sheets("Bookings Made").Range
("A1:B24"), PlotBy:=xlColumns

(NB: I am using with statments for ease of use)

as you can see, the range is set to ("A1:B24"), but I need it to be more
dymanic. I tried using ("A:B"), but that pulls the same error (as it is
looking for data which isn't there in B30 for example)

should I use some sort of length checker to see what the last row with data
is? and how would I do it?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...chart/200707/1

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-increment data source cell references when copying charts Dave Excel Discussion (Misc queries) 2 July 5th 06 07:45 PM
How to auto-increment data source cell references when copying cha Dave Charts and Charting in Excel 0 June 28th 06 05:41 AM
Pivot table format changes if value of source data is null Frustrated with formatting! Excel Discussion (Misc queries) 0 October 24th 05 01:16 AM
Pivot Table data source "data source contains no visible tables" Jane Excel Worksheet Functions 0 September 29th 05 08:28 PM
Pivot Table Auto Update Data Source? Ket Excel Worksheet Functions 1 February 18th 05 11:14 PM


All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"