View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default 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?