View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Select upto last available Row

Assuming you mean the last row in Column A thru N with a formula or constant
value in it...

LastRow = Range("A:AN").Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
Range("A2:AN" & LastRow).Select

Change the xlFormulas to xlValues if you want have only constant values in
your cells or, if there are formulas in them, if you want to ignore formulas
that evaluate to the empty string ("").

--
Rick (MVP - Excel)


"Atif" wrote in message
...
Hi

I am using below function to select fix range, how can I change "100" with
a
variable, so it select from "A2" upto last row which have entry.

Range("A2:AN100").Select

Regards