1

In other words, if the value of a cell, say A1, is =Date(), then displayed in cell A1 I will see the date, but then I want B1 to be =FuncText(A1), then I want to see 'Date()' displayed in cell B1.

To emphasize, I want to see the text 'Date()', i.e. the six chars ending with a ')' in B1.

2 Answers 2

1

In B1 Cell, write =A1

So you will see the A1 Cell Date in B1 Cell too

Updated as per your information:-

Function FuncText(fma As Range) 
    If fma.HasFormula Then 
        FuncText = fma.Formula 
    Else: FuncText = fma 
    End If 
End Function 

Output:

On B1 Cell, returns as "=Date()"

But if you want exactly as "Date()" then use below function

Function FuncText(fma As Range)
    If fma.HasFormula Then
        FuncText = Mid(fma.Formula, 2, Len(fma.Formula))
    Else: FuncText = Mid(fma, 2, Len(fma))
    End If
End Function
2
  • You misunderstand me, I want to see the text 'Date()', i.e. the six chars ending with a ')' in B1.
    – ProfK
    Dec 20, 2011 at 18:06
  • updated my answer, as per your update. Dec 20, 2011 at 18:24
1

Quick & simple. You'll need to make a user-defined function to do this... but it's do-able:

http://dmcritchie.mvps.org/excel/formula.htm

1
  • 2
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Jul 23, 2012 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .