#1   Report Post  
Posted to microsoft.public.excel.charting
Michael
 
Posts: n/a
Default truncating series

Excel 2002. A macro (Bebington) copies information from 1 sheet to another
from which a line chart is created. It truncates the last series ( although
the data has been copied correctly) - loses the series name and last row of
info
Code
Sub Bebington()
parameter1 = "="
parameter2 = "BEBINGTON & WEST WIRRAL"
parameter3 = "Coverage (less than 5 years since last adequate test) for the
period 2001-2005. Target 80%"
Call PCO(parameter1, parameter2, parameter3)
End Sub

Sub PCO(p1, p2, p3)
Sheets("Sheet1").Select
Selection.AutoFilter Field:=1, Criteria1:=p1
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Sheet1").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:=p2
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Rows("22:22").Select
Selection.Delete
Sheets("Chart1").Select
Call charttitle(p3)
End Sub


Sub charttitle(p3)
With ActiveChart
.HasTitle = True
.charttitle.Characters.Text = p3
End With
ActiveChart.ChartArea.Select
End Sub


Reply
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
Trying to change ColorIndex for series settings SiriS Charts and Charting in Excel 3 March 14th 06 01:54 PM
Chart -- Source Data... -- Series dialog window Sarah Jane Charts and Charting in Excel 2 January 24th 06 10:27 AM
How to change Series order in a Combination Chart? vrk1 Charts and Charting in Excel 3 April 1st 05 07:21 AM
How to change Series Order in a Combination Chart? vrk1 Excel Discussion (Misc queries) 0 March 31st 05 11:19 PM
series graph -- one series being added to another series rich zielinski via OfficeKB.com Charts and Charting in Excel 3 March 30th 05 06:23 PM


All times are GMT +1. The time now is 11:53 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"