View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Variable Row Numbers

A suggestion?

Sub copyrows()
Rows("3:" & Cells(Rows.Count, "a").End(xlUp).Row).Copy
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Glynn Taylor" wrote in message
...
Hello

Using Excel 2000

Having determined the first row with a blank cell A1 I calculate the first
and last rows which I need to copy to another sheet. see below

When I try to select these rows with Rows("first_row:last_row").Select
the macro fails.

Row = 3
While Cells(Row, 1) < ""
Row = Row + 1
Wend

last_row = Row - 1
first_row = last_row - 11

Rows("first_row:last_row").Select

Any ideas?

Thank you