View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michael Tomasura Michael Tomasura is offline
external usenet poster
 
Posts: 8
Default Getting the formula of a cell as text

Try something like this

x = Mid(Selection.Formula, 2, Len(Selection.Formula))
Range(x).Select



--

"Beto" wrote in message
om...
Hi,
I want to create a macro that puts the cursor over a cell which is
retrieved from the cell it's standing on.
Wow, I notice english is not my first language, because even I can't
really understand what I just wrote :)

An example would be better.

Let's say I'm standing on a cell with the formula "=A25".
Now when I'm standing on this cell I want to run a macro that moves
the cursor over the referenced cell (A25).

Now I can go to a cell if I have the position of the cell as text in
the current cell as:

Range(Activecell.Value).Select

How can I achieve this to replace Activecell.value with the text
gotten from the formula?

TIA
Regards,
--
Beto