Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave
"Dave Peterson" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rows(first_row & ":" & last_row).Select
"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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bob
"Bob Phillips" wrote: Rows(first_row & ":" & last_row).Select "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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anything between quote marks is considered text, even if those characters
spell out the name of a variable. The key is to concatenate the variable names to the other fixed text... Rows(first_row & ":" & last_row).Select Rick "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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Rick
"Rick Rothstein (MVP - VB)" wrote: Anything between quote marks is considered text, even if those characters spell out the name of a variable. The key is to concatenate the variable names to the other fixed text... Rows(first_row & ":" & last_row).Select Rick "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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Don
"Don Guillett" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Divide variable numbers into groups | Excel Discussion (Misc queries) | |||
Adding variable range of numbers | Excel Worksheet Functions | |||
Average the last eight or nine (Variable) numbers in a row. | Excel Discussion (Misc queries) | |||
extracting numbers from variable text | Excel Discussion (Misc queries) | |||
Data in variable row numbers... | Excel Programming |