View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default Select until blank row

I think that maybe I know what you want, so maybe something like this?
Sub Maybe()
Range("A1", Range("A" & Rows.Count).End(xlUp).Offset(1)).Select
End Sub
If not, post back with a bit more info about what you are trying to do. For
instance, why all the "Trim"? HTH Otto
"Bonnie" wrote in message
...
Looking for some advice for the best way to do this. Here's what I did
but I
think is cluncky:

Windows("MYFILE.xls").Activate
If Trim(Range("MASTER!A4")) = "" Then
Range("A1:A4").Select
Else
If Trim(Range("Master!A5")) = "" Then
Range("A1:A5").Select
Else
If Trim(Range("Master!A6")) = "" Then
Range("A1:A6").Select
Else
If Trim(Range("Master!A7")) = "" Then
Range("A1:A7").Select
Else
If Trim(Range("Master!A8")) = "" Then
Range("A1:A8").Select
Else
If Trim(Range("Master!A9")) = "" Then
Range("A1:A9").Select
Else
If Trim(Range("Master!A10")) = "" Then
Range("A1:A10").Select
End If
End If
End If
End If
End If
End If
End If

I want to select all the rows with the last one being the blank row.

Thanks in advance.