Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2001
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Viewing Formulae (Excel 2002)

    I notice that the spreadsheet in StarOffice 6 has a function =FORMULA( ). Basically, it displays the formula in the cell designated in the parameters. I have often wanted to do this in Excel. Is there a way to do it, other than just turning on the View Formulas command in Options?

    Viewing all the formulae in a spreadsheet is overkill. I'd just like to display the formulae in certain cells (and display them in cells other than the target cells).

    Any advice? TIA

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Viewing Formulae (Excel 2002)

    The following user defined function will return the formula in a cell that is passed to it. If Excel does not see the entry as a formula it is preceeded by the expression Value : <pre>Function ShowFormula(rng As Range)
    If rng.HasFormula Then
    ShowFormula = rng.Formula
    Else
    ShowFormula = "Value : " & rng.Text
    End If
    End Function</pre>

    To show the formula in A1 you would use =ShowFormula(A1).

    Andrew C

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Viewing Formulae (Excel 2002)

    Robert

    There was also a thread on <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=xl&Number=104496&Search =true&Forum=xl&Words=Comment&Match=And&Searchpage= 0&Limit=10&Old=allposts&Main=104496> copying formula to a comment </A> which might help. It was just a week or so ago. I thought it was pretty neat, which is why I remembered it.

    Fred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •