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 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?