Column Selection ...

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
This may or may not be as self Evident as it seems, but anyway, I wanted to Check...

Is the Selection of:

A:A,B:B,C:C, right down to Z:Z

In a macro, the Same as Selecting

A:Z

Within the Context of a Macro Selecting Columns?

Ta

(y)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
santeria said:
This may or may not be as self Evident as it seems, but anyway, I wanted to Check...

Is the Selection of:

A:A,B:B,C:C, right down to Z:Z

In a macro, the Same as Selecting

A:Z

Within the Context of a Macro Selecting Columns?

Ta

(y)
I know that
Activesheet.columns("A:Z").select would select all columns from a to z
Activesheet.columns("A:A,B:B,C:C,....,Z:Z").select sounds like it does the same thing the hard way, but I don't use this syntax normally, so I can't be sure.
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
I am just trying to trim down the Large Macro I have so that selections are a bit more consistent.

I realise it may be a bit of a simple question, but I don't think it's as self-evident as it may seem.

Ta

(y)
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
FYI,
Your orginal syntax is far from useless though, if you wanted to select multiple sections that's how you would go.
ie. Activesheet.Columns("A:B,D:E,G:H").select
Would be like Pressing Ctrl and Hightlight Columns A and B, D and E, G and H.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,960
Messages
5,856,525
Members
431,820
Latest member
Tori Murphy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top