View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default select non contiguos columns by variable name

With ActiveSheet
Union(.Columns(parts), .Columns(dates), .Columns(cost)).Select
End With

But remember, it's very rare where you actually have to select a range to work
with it.

John Keith wrote:

I have integer variables that define several columns of interest in a
worksheet. How do I select multiple non contiguous columns?

Example

parts = 3 ' column 3 has parts info
dates = 6 ' column 6 has date info
cost = 10 ' column 10 has cost info

columns(parts, dates, cost).Select this statement does not work

TIA


John Keith


--

Dave Peterson