![]() |
Goto a dynamic cell address within a macro
My workbook is formula driven and the tables will dynamically expand or
contract with the size of the data. I have a need to move to the next available row before starting the next subroutine. I have created a formula that computes the correct cell address but I don't know how to structure a goto command within the macro to use it. Can you help? |
One way:
Range(cell_address).Activate Or, if the cell could be on a different sheet: Application.GoTo Range(cell_address) In article , blkane wrote: My workbook is formula driven and the tables will dynamically expand or contract with the size of the data. I have a need to move to the next available row before starting the next subroutine. I have created a formula that computes the correct cell address but I don't know how to structure a goto command within the macro to use it. |
JE
Thanks, I used Application.GoTo Reference=(cell_address) and successfully navigated to a cell address. My question is can the cell address be retrieved from the value of a formula? The cell address that I need to navigate to will change each time the workbook is used. I can create a formula to determine what the cell address will be. But, I need the macro to take the value of this formula to use in the goto function. Is this possible? "JE McGimpsey" wrote: One way: Range(cell_address).Activate Or, if the cell could be on a different sheet: Application.GoTo Range(cell_address) In article , blkane wrote: My workbook is formula driven and the tables will dynamically expand or contract with the size of the data. I have a need to move to the next available row before starting the next subroutine. I have created a formula that computes the correct cell address but I don't know how to structure a goto command within the macro to use it. |
As long as your formula returns a string that looks like an address, then it
should work. application.goto reference:=range("A" & 5-4+17-3) Went to A15 of the activesheet. blkane wrote: JE Thanks, I used Application.GoTo Reference=(cell_address) and successfully navigated to a cell address. My question is can the cell address be retrieved from the value of a formula? The cell address that I need to navigate to will change each time the workbook is used. I can create a formula to determine what the cell address will be. But, I need the macro to take the value of this formula to use in the goto function. Is this possible? "JE McGimpsey" wrote: One way: Range(cell_address).Activate Or, if the cell could be on a different sheet: Application.GoTo Range(cell_address) In article , blkane wrote: My workbook is formula driven and the tables will dynamically expand or contract with the size of the data. I have a need to move to the next available row before starting the next subroutine. I have created a formula that computes the correct cell address but I don't know how to structure a goto command within the macro to use it. -- Dave Peterson |
All times are GMT +1. The time now is 08:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com