Use memory variable in range selection

  • Thread starter Thread starter Ron5440
  • Start date Start date
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
 
This single line should do what you want...

Range(Range("B12"), ActiveCell).Select
 
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
 
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
 
Back
Top