Looping Macro choosing Columns

whose2know

Board Regular
Joined
May 1, 2002
Messages
59
I have built many macros where I set a loop up to select rows. Since rows are numeric, the statement > Range("A" & Start & ":AQ" & Start).Select < works where Start is the loop counter.

Today I ran into the need to select columns through a loop. I was trying to find how to do it using R1C1 commands, but was unable to. I know about the offset command, but that won't work in my case.

I'd appreciate any help anyone can provide.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I'm trying to take the data in columns B to AE, copy it to another sheet (one column at at a time), sort it, delete blank rows, sort it back to original order, and then copy to a new sheet. I want to do a loop where I can select a specific column during each loop.
 
Upvote 0
It is much easier if you use cells() instead of range(). Cells(row number, column number).
 
Upvote 0
I've never used cells() before only range().select

I'll look up cells in the help files.

Any pointers you can give me in using cells()? Is a valid statement cells(r1c1).select?
 
Upvote 0
how do I select B1:B44 using a cells statement? I have only been successful with selecting B1 or B44 -> cells(2,1).select
 
Upvote 0
Range(Cells(1,2),Cells(44,2)).select
This message was edited by RET79 on 2002-05-02 15:04
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,142
Members
448,551
Latest member
Sienna de Souza

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
Back
Top