Use memory variable in range selection

R

Ron5440

My range always starts at B12 but it varies in depth.
After I find the bottom right I need to select to the top left
x = ActiveCell.Address
Range("b12":"x").Select
I did this a couple of years ago in another piece of code but cannot find an
example of it and don't remember how I did it.
I am still searching...if anyone has a quick piece of code it would be
appreciated.

Thnks,
Ron
 
R

Rick Rothstein

This single line should do what you want...

Range(Range("B12"), ActiveCell).Select
 
J

Jacob Skaria

My range always starts at B12 but it varies in depth.
Range("B12", Range("B12").End(xlDown)).Select
After I find the bottom right I need to select to the top left
Range(Range("B12").Offset(, -1), Range("B12").End(xlDown)).Select

If this post helps click Yes
 
M

Matthew Herbert

Ron,

One method is below. If you want to "smash" string data together, use
CONCATENATE, or & (see below).

Best,

Matthew Herbert

Range("B12",x).Select
Range("B12:" & x).Select
 
Top