View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Move a row to the centre of my sheet Excel 2002

Sub AAA()
Dim rng As Range, numRows As Long
Set rng = Cells.Find("ABCD")
rng.Select
numRows = Int(ActiveWindow.VisibleRange.Rows.Count / 2)
If rng.Row numRows Then
ActiveWindow.ScrollRow = rng.Row - numRows
Else
ActiveWindow.ScrollRow = 1
End If
End Sub

--
Regards,
Tom Ogilvy





"Paul" wrote in message
...
Hello All
I would like to run an excel spreadsheet maximized. Search for a cell with
data that meets certain criteria. When a match is found move the row that
the cell is in to the middle of my sheet. I have the search done,but I
haven't figured out how to centre the row.
Any help would be much appreciated,
Paul