Thread: range selection
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 range selection

Hi Douvid,

Is this what you want?

Dim sRange As String
sRange = "A1:A" & Cells(Rows.Count, "A").End(xlUp).Row & "," & _
"F1:F" & Cells(Rows.Count, "F").End(xlUp).Row & "," & _
"AC1:AC" & Cells(Rows.Count, "AC").End(xlUp).Row
Range(sRange).Select

--

HTH

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

"douvid" wrote in message
...
Hi ,
"A:A, F:F, AC:AC". those 3 columns have a different numbers of rows in

each file. let's say x identify the last row.
how do I now select this range to apply a specific format.

I though something like "A1:A" & x but this works only for one column.
How do I select all ?

thanks
douvid