View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Variable Row Numbers

Try:
Rows(first_row & ":" & last_row).Select

Glynn Taylor wrote:

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


--

Dave Peterson