Goto a dynamic cell address within a macro

B

blkane

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?
 
J

JE McGimpsey

One way:

Range(cell_address).Activate

Or, if the cell could be on a different sheet:

Application.GoTo Range(cell_address)
 
B

blkane

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?
 
D

Dave Peterson

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.
 
Top