How do i refer to cell contents in a macro?

R

Rob

I am a novice and i am trying to write a macro to position the sheet at a cell.
The cell reference that i want to go to is a variable which is the
calculated content of another cell (CELL 2). How do i insert the CONTENTS of
cell 2 (address I want to go to: i.e. R45) into the macro so it works
properly?
 
G

Gary''s Student

Lets say A1 contains the formula
="Z" & ROW()*100

A1 displays:
Z100

Then:

Sub GoThere()
Application.Goto reference:=Range(Range("A1").Value)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top