Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This single line should do what you want...
Range(Range("B12"), ActiveCell).Select -- Rick (MVP - Excel) "Ron5440" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
take the "" off of the x, they are not needed.
range("B12":x).select -- If this helps, please remember to click yes. "Ron5440" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 --------------- Jacob Skaria "Ron5440" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 "Ron5440" wrote: 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Range("b12", ActiveCell).Select If this post helps click Yes --------------- Jacob Skaria "Ron5440" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change InputBox Range Selection to Column Letter Selection | Excel Programming | |||
public variable declaration, memory efficient? | Excel Programming | |||
Store Current Selection As Range Variable. | Excel Programming | |||
Range Address Memory Variable Limitation | Excel Programming | |||
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. | Excel Programming |