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