see attched file "Dharani ,,,,,". first and second sheets are yours. I have added a sheet called "result"
my version is excel 2007(compatablity mode).I hope the macro will work in your excel 2003
the mcro is in the module but also repeated here
if there is problem in donwloading the file revert to the newsgsroup
Sub test()
Dim r As Range, cfind1 As Range, cfind2 As Range, add As String, title As String
Dim llastcell As Range, hdng As Range
Worksheets("result").Cells.Clear
Worksheets("input file").Cells.Copy Worksheets("result").Range("A1")
Worksheets("result").Activate
ActiveSheet.DrawingObjects.Delete
Set r = ActiveSheet.UsedRange
r.AutoFilter Field:=1, Criteria1:="apsim*"
r.SpecialCells(xlCellTypeVisible).EntireRow.Delete
Range("a1").EntireColumn.Insert
Set llastcell = Cells(Rows.Count, "B").End(xlUp)
Set cfind1 = Cells.Find(what:="title", lookat:=xlPart, after:=llastcell)
add = cfind1.Address
title = Right(cfind1, Len(cfind1) - 8)
Range(cfind1.Offset(2, -1), cfind1.End(xlDown).Offset(0, -1)).FormulaArray = title
Do
Set cfind1 = Cells.FindNext(cfind1)
If cfind1 Is Nothing Then Exit Do
If cfind1.Address = add Then Exit Do
title = Right(cfind1, Len(cfind1) - 8)
Range(cfind1.Offset(2, -1), cfind1.End(xlDown).Offset(0, -1)).FormulaArray = title
Loop
Set r = ActiveSheet.UsedRange
r.AutoFilter Field:=2, Criteria1:="Title*"
r.SpecialCells(xlCellTypeVisible).EntireRow.Delete
r.AutoFilter Field:=2, Criteria1:="Season"
r.Offset(1, 0).Resize(r.Rows.Count - 1).EntireRow.Delete
ActiveSheet.AutoFilterMode = False
Range("a1") = "Title"
ActiveSheet.Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("A1").Select
MsgBox "macro over see sheet result"
End Sub
Bookmarks