Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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
share|improve this answer
    
You misunderstand me, I want to see the text 'Date()', i.e. the six chars ending with a ')' in B1. – ProfK Dec 20 '11 at 18:06
    
updated my answer, as per your update. – Siva Charan Dec 20 '11 at 18:24

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

share|improve this answer
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. – Oliver Salzburg Jul 23 '12 at 17:47

You must log in to answer this question.

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