Posted to microsoft.public.excel.programming
|
|
VBA to select multiple columns
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.
|