Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have a cell selected, but I don't know where it will be and I want to go from it to the cell which is in the same row but in column M. Because of this, I can't use OFFSET(Y,X), because I won't know what X and Y will need to be. Cheers |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
robzrob wrote:
I have a cell selected, but I don't know where it will be and I want to go from it to the cell which is in the same row but in column M. Because of this, I can't use OFFSET(Y,X), because I won't know what X and Y will need to be. Since it's *always* column M, you can hardcode that bit of info into your formula/code. As a spreadsheet formula, you could do something like this: =INDIRECT(ADDRESS(ROW(),13)) (But test & adjust that to suit your needs; I'm not very good with spreadsheet functions.) In VBA, I'd probably do this: Cells(ActiveCell.Row, 13).Select For both VBA and spreadsheet formulae there are other ways; you might want to do some investigating. Open the "insert function" dialog and search for "offset" to start. -- The cinema is not a slice of life but a piece of cake. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sunday, 26 August 2012 20:17:59 UTC+1, Auric__ wrote:
robzrob wrote: I have a cell selected, but I don't know where it will be and I want to go from it to the cell which is in the same row but in column M. Because of this, I can't use OFFSET(Y,X), because I won't know what X and Y will need to be. Since it's *always* column M, you can hardcode that bit of info into your formula/code. As a spreadsheet formula, you could do something like this: =INDIRECT(ADDRESS(ROW(),13)) (But test & adjust that to suit your needs; I'm not very good with spreadsheet functions.) In VBA, I'd probably do this: Cells(ActiveCell.Row, 13).Select For both VBA and spreadsheet formulae there are other ways; you might want to do some investigating. Open the "insert function" dialog and search for "offset" to start. -- The cinema is not a slice of life but a piece of cake. Thank you, that looks as though it will do very well. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to SUM for indeterminate number of rows? | Excel Worksheet Functions | |||
Creating a subtotal for an indeterminate number of rows | Excel Discussion (Misc queries) | |||
indeterminate 0/0 | Excel Discussion (Misc queries) | |||
How can I calculate amount of time left based on amount spent? | Excel Worksheet Functions | |||
Naming range where the no of rows indeterminate | Excel Programming |