View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Displaying formulas

Cannot be done without a bit of VBA.

Function ShowFormula(cell)
Application.Volatile
ShowFormula = "No Formula"
If cell.HasFormula Then ShowFormula = cell.Formula
End Function

Usage is: =ShowFormula(cellref) as in =ShowFormula(A1)

Copy/paste the UDF above into a General Module in your workbook.

If not familiar with macros and VBA, visit David McRitchie's website on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the above code in there. Save the
workbook and hit ALT + Q to return to your workbook.


Gord Dibben Excel MVP

On Sun, 14 Oct 2007 11:00:00 -0700, Debbie
wrote:

I want to display formulas in only 2 columns of the trial balance worksheet,
and the rest of the worksheet to display the values in the proper format. I
have tried displaying the values, but it changes the whole worksheet.

Any suggestions?

Thanks...Debbie