View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How to specify a range in Excel macro

Eric,.

Range("A1").Resize(1, Cells(1,
Columns.Count).End(xlToLeft).Column).Select


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Eric" wrote in message
...
Hi,

How could I select a range in macro if I don't know how
many columns I have, meaning my columns is variable.

Example: Range("A1:A4").select

Need help.

TIA
Eric