View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How to reference the formula in a cell.

Not too clear on what you want.

Function showfn(mycell)
If mycell.HasFormula Then
showfn = Mid(mycell.Formula, 2)
Else
showfn = ""
End If
End Function

=showfn(A1) entered in B1

Will show the formula from A1 without the "=" sign.


Gord Dibben MS Excel MVP

On Mon, 2 Nov 2009 16:16:01 -0800, fasta13
wrote:

Is there a function in excel that I am missing which will reference the
formula in a cell and not the value (recalculating that formula in the new
cell)?

If not, can someone who has a macro which does this post it please, it would
be very helpful.