View Single Post
 
Old 12-15-2010, 12:54 PM
BjornS BjornS is offline Windows Vista Office 2003
Competent Performer
 
Join Date: Jan 2010
Location: Sweden
Posts: 116
BjornS is on a distinguished road
Default

Hi,
Try this function:

Function CellFormula(CellRef As Range) As String
CellFormula = CellRef.Formula
End Function

You implement it by first pressing Alt-F11.
Then select the menu Insert/Module.
Now paste the code above.
Alt-Q to go back to Excel.

I am a macro beginner, but it looks like it works when I tried it

In cell B1 (for example) you can now type: =CellFormula(A1) to show the formula that is written in cell A1. This formula can of course by copied down or where ever you like.

Kind regards
Bjorn
Reply With Quote