Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a program where I want to select a range of rows but don't know the
row numbers as these are stored as variables e.g. startrow and endrow. How can I select rows startrow through endrow? rows("startrow:endrow").select doesn't work and it appears that this method must have numbers as the input e.g. rows("28:34").select anyone know how I might acheive this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set MyRows =Rows(StartRow & ":" & EndRow)
MyRows.Select "JLR-Mart" wrote: I have a program where I want to select a range of rows but don't know the row numbers as these are stored as variables e.g. startrow and endrow. How can I select rows startrow through endrow? rows("startrow:endrow").select doesn't work and it appears that this method must have numbers as the input e.g. rows("28:34").select anyone know how I might acheive this? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub aRowsByAnyOtherName()
alpha = 13 omega = 17 Rows(alpha & ":" & omega).Select End Sub -- Gary''s Student - gsnu200830 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
startrow = 10 endrow = 12 Rows(startrow & ":" & endrow).Select Mike "JLR-Mart" wrote: I have a program where I want to select a range of rows but don't know the row numbers as these are stored as variables e.g. startrow and endrow. How can I select rows startrow through endrow? rows("startrow:endrow").select doesn't work and it appears that this method must have numbers as the input e.g. rows("28:34").select anyone know how I might acheive this? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub selectvarrows()
startrow = 12 endrow = 14 Rows(startrow & ":" & endrow).Select End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "JLR-Mart" wrote in message ... I have a program where I want to select a range of rows but don't know the row numbers as these are stored as variables e.g. startrow and endrow. How can I select rows startrow through endrow? rows("startrow:endrow").select doesn't work and it appears that this method must have numbers as the input e.g. rows("28:34").select anyone know how I might acheive this? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One mo
Rows(startrow).resize(endrow-startrow+1).select JLR-Mart wrote: I have a program where I want to select a range of rows but don't know the row numbers as these are stored as variables e.g. startrow and endrow. How can I select rows startrow through endrow? rows("startrow:endrow").select doesn't work and it appears that this method must have numbers as the input e.g. rows("28:34").select anyone know how I might acheive this? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select multiple rows not next to each other | Excel Worksheet Functions | |||
Using variables in Rows.Select | Excel Programming | |||
using variables to select multiple rows using a macro | Excel Programming | |||
using variables to select multiple rows using a macro | Excel Programming | |||
Count rows based on multiple variables | Excel Programming |