LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VBA to select multiple columns

Both of you are correct and I was wrong. I was in a hurry I guess I
commented wrong when testing.
..columns 'gets a1:e1
..entirecolumn 'of course, does the whole column
so solly

--
Don Guillett
SalesAid Software

"Norman Jones" wrote in message
...
Hi Don,

Just tested. Both do the SAME and I like to keep em short


From the intermediate window:

Range(Cells(1, 1), Cells(1, 5)).Columns.Select
? Selection.address
$A$1:$E$1

Range(Cells(1, 1), Cells(1, 5)).entireColumn.Select
? Selection.Address
$A:$E

What was your test?

---
Regards,
Norman



"Don Guillett" wrote in message
...
Just tested. Both do the SAME and I like to keep em short.

--
Don Guillett
SalesAid Software

"Norman Jones" wrote in message
...
Hi Don,

Range(Cells(1, 1), Cells(1, 5)).Columns.Select


I think you intended:

Range(Cells(1, 1), Cells(1, 5)).entireColumn.Select

---
Regards,
Norman



"Don Guillett" wrote in message
...
one way using numbers.
Sub selectcolumns()
'Columns("a:e").Select
Range(Cells(1, 1), Cells(1, 5)).Columns.Select
End Sub

--
Don Guillett
SalesAid Software

"Marvin" wrote in message
...
I can use a statement like:

rows("3:5").select

I can use a statement like:

columns(3).select

but

columns("3:5").select

fails.

My objective is to select a number of columns based on a
cell value, starting with the current column.
Is it necessary for me to calculate the column "letters"
or is there a simpler way?

Thanks.










 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I cant select rows or columns cp402 Excel Discussion (Misc queries) 0 April 6th 10 08:17 PM
select multiple criteria multiple worksheets koneil Excel Worksheet Functions 1 December 12th 07 04:31 PM
Select second columns only My View Excel Discussion (Misc queries) 3 July 7th 05 11:37 PM
Select from Columns ten Excel Programming 1 August 13th 03 05:56 PM
Printing Only Select Columns Bill Martin Excel Programming 1 July 31st 03 04:56 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"