![]() |
select multiple rows using variables
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? |
select multiple rows using variables
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? |
select multiple rows using variables
Sub aRowsByAnyOtherName()
alpha = 13 omega = 17 Rows(alpha & ":" & omega).Select End Sub -- Gary''s Student - gsnu200830 |
select multiple rows using variables
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? |
select multiple rows using variables
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? |
select multiple rows using variables
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 |
All times are GMT +1. The time now is 05:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com