I want to select coloums A-BR of different rows in a loop.
How do I setup the Range (A[some_number]:BR[some_number]).select
the number will change a few times and wont be the same everytime I run the macro
I want to select coloums A-BR of different rows in a loop.
How do I setup the Range (A[some_number]:BR[some_number]).select
the number will change a few times and wont be the same everytime I run the macro
Something like this but change your do while to what you need.
Dim x, y As Single
x = 1
y = 1
Do While Range("B" & x).Value <> ""
Range("A" & x & ":AR" & y).Select
x = x + 1
y = y + 1
Loop
Try something like this
dim lngThisNumber as long
dim lngThatNumber as long
lngThisNumber = 1
lngThatNumber = 12345
range(cells(lngThisNumber, "A"), cells(lngThatNumber, "BR").Select
--
HTH...
Jim Thomlinson
"evil baby" wrote:
>
> I want to select coloums A-BR of different rows in a loop.
>
>
> How do I setup the Range (A[some_number]:BR[some_number]).select
>
> the number will change a few times and wont be the same everytime I run
> the macro
>
>
> --
> evil baby
> ------------------------------------------------------------------------
> evil baby's Profile: http://www.excelforum.com/member.php...o&userid=31983
> View this thread: http://www.excelforum.com/showthread...hreadid=520237
>
>
for i = 1 to 20
cells(i,1).Resize(1,70).Select
msgbox selection.Address
Next
--
Regards,
Tom Ogilvy
"evil baby" <[email protected]> wrote
in message news:[email protected]...
>
> I want to select coloums A-BR of different rows in a loop.
>
>
> How do I setup the Range (A[some_number]:BR[some_number]).select
>
> the number will change a few times and wont be the same everytime I run
> the macro
>
>
> --
> evil baby
> ------------------------------------------------------------------------
> evil baby's Profile:
http://www.excelforum.com/member.php...o&userid=31983
> View this thread: http://www.excelforum.com/showthread...hreadid=520237
>
Thanks for the help again
I ended up using
Range("A" & x, "L" & x).Select
and just setting x to activecell
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks