View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default A function that returns the formula of a cell as a string

Lacty,

Function MyForm(myC As Range) As String
MyForm = myC.Formula
End Function

Copy that code into a regular codemodule, then use it like

=MyForm(A3)

HTH,
Bernie
MS Excel MVP


"Lacty" wrote in message
...
Hi

Does anyone know how to write a formula which will return the formula
in another cell as a string?

e.g if A3 contains the formula A1+ A2, I want to write a formula in B3
with will return the formula in A3 as string '= A1 + A2. Hence the
value in B3 will be string '= A1 + A2

Thanks in advance

Lacty