LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default having trouble with a chart range

I have a table that is being filtered. I want a chart to be added
using a column found using a FIND. Because table is being filtered the
last row is changes. So I am lost on how to set the range for the
chart - see ***** in code below.

This chart is being deleted and recreated after the filter changes. I
was using the UsedRange, but that gives me part of my table that has
been filtered out.

Chart data should be (Column variable, cell 1 to column variable, cell
in last row).

I appreciate the help. - Mike


'data has been filtered, now find last row
Range("A65000").End(xlUp).Select
LastDataRow = ActiveCell.Row 'got last row

'now find the first dfParm in a series - so column is unknown as of
now
Rows("1:1").Select
Selection.Find(What:=dfParm, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
CrntCol = ActiveCell.Column 'got current column #

Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SetSourceData Source:=Sheets(DataSheet).*****,
PlotBy:=xlColumns
 
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
TROUBLE WITH GETTING DATE RANGE IN CHART/GRAPH Wendy Charts and Charting in Excel 1 November 20th 08 10:35 PM
Pie Chart trouble for 2007 Lros3950 Charts and Charting in Excel 1 March 17th 07 02:14 PM
Trouble creating a chart jdh Excel Programming 2 February 6th 07 03:34 PM
chart trouble chilegrowr Charts and Charting in Excel 4 September 15th 05 03:47 PM
Orginizational Chart Trouble Cretin Excel Discussion (Misc queries) 1 March 30th 05 07:39 AM


All times are GMT +1. The time now is 11:08 PM.

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"