How to print formulas and their results on the same page?

  • Thread starter Thread starter Dmitriy Kopnichev
  • Start date Start date
Do you copy the functions in a module in the same file or in your
personal.xls
 
I placed this formula in B7 to see the formula in A7 on a new worksheet.
 
What do you mean by module? I copy the functions to cells on a new
worksheet.
 
Hi Dmitriy

Alt-F11
Insert>Module from the menubar
paste the functions in this module
Alt-Q to go back to Excel

Function ShowAllInfo(rng As Range)
' show Formula and Result from cell
ShowAllInfo = Right(rng.Formula, Len(rng.Formula) - 1) _
& " = " & rng.Value
End Function

Function ShowFormula(rng As Range)
ShowFormula = rng.Formula
End Function


In a worksheet cell you can use these formulas

=ShowAllInfo(A7)

Or

=Showformula(A7)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top