Thread: Select range
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Select range

Try this

i = Cells(Cells.Rows.Count, "A").End(xlUp).Row

Range("a1:A" & i).Select

Mike

"Arne Hegefors" wrote:

Hi! I am writing a macro where I want to select a range. the first cell I
want to have in the selection is A1 but the last cell is
Range("a1").offset(i,0). Thus I cannot simple write Range("a1:A3").select.
how shall I write it? pls help!