Display Formula instead of Result

aabbasi

Board Regular
Joined
Mar 4, 2002
Messages
188
Is there a way to display Formula's instead of Result on Excel Sheet. I want to use this function to train people how the calculation is performed on a particular sheet. I have about 20 different formulas used on this sheet.

Any help will be appreciated!
Thank you
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
On 2002-09-13 06:37, aabbasi wrote:
Is there a way to display Formula's instead of Result on Excel Sheet. I want to use this function to train people how the calculation is performed on a particular sheet. I have about 20 different formulas used on this sheet.

Any help will be appreciated!
Thank you

I believe the shortcut to show formulas is
Ctrl+`. This may change the formatting on your sheet.

I use UDF (User Defined Function) GF (short for GetFormula)

Function GF(Rng As Range) As String
GF = Rng.Formula
End Function

Example =gf(A2) shows =Today()

or to document cells (including arrays)

formula is in A1
in another cell type A1
If the following UDF is in your file and it is assigned the shortcut Ctrl_Shift_F.

Using the function will format A1 and show
the complete formula that is in A1.

Sub FormulaDocumentation()
'
' Macro recorded 22/12/2001 by D.G. Patton
'
Dim Address1 As String
ActiveCell = UCase(ActiveCell)
Address1 = ActiveCell.Value
Selection.HorizontalAlignment = xlRight
If VarType(ActiveCell) = 0 Then
MsgBox "Did you select the cell with the formula's address?"
ElseIf Range(Address1).HasArray Then
ActiveCell.Offset(0, 1) = "{" & Range(Address1).Formula & "}"
ElseIf VarType(Address1) = 8 Then
ActiveCell.Offset(0, 1) = "'" & Range(Address1).Formula
Else
ActiveCell.Offset(0, 1) = Range(Address1).Formula
End If
End Sub

Assign to Ctrl-Shift-F
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top