ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting Columns (https://www.excelbanter.com/excel-programming/339355-selecting-columns.html)

Shatin[_2_]

Selecting Columns
 
I am scratching my head over this: I can select rows 1 to 20 by
rows("1:20").select. How come I can't select columns 1 to 20 by
columns("1:20").select?



Rowan[_8_]

Selecting Columns
 
Because the address of row 1 is 1 while the address of column 1 is "A" so:
Columns("A:T").Select
or
Range(Cells(1, 1), Cells(1, 20)).EntireColumn.Select

Hope this helps
Rowan

Shatin wrote:
I am scratching my head over this: I can select rows 1 to 20 by
rows("1:20").select. How come I can't select columns 1 to 20 by
columns("1:20").select?



PY & Associates[_4_]

Selecting Columns
 
columns use alphabets please

"Shatin" wrote:

I am scratching my head over this: I can select rows 1 to 20 by
rows("1:20").select. How come I can't select columns 1 to 20 by
columns("1:20").select?




NickHK

Selecting Columns
 
Shatin,
Because Columns are "lettered" not numbered.
Try Columns("A:E")

NickHK

"Shatin" wrote in message
...
I am scratching my head over this: I can select rows 1 to 20 by
rows("1:20").select. How come I can't select columns 1 to 20 by
columns("1:20").select?





Tom Ogilvy

Selecting Columns
 
Probably for consistency.

Range("1:20") refers to rows
Range("A:T") refers to columns.

While Columns("1:20") would not be ambiguous, for consistency I assume they
chose to require letters.

--
Regards,
Tom Ogilvy



"Shatin" wrote in message
...
I am scratching my head over this: I can select rows 1 to 20 by
rows("1:20").select. How come I can't select columns 1 to 20 by
columns("1:20").select?






All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com