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

D

Dmitriy Kopnichev

What do you mean by module? I copy the functions to cells on a new
worksheet.
 
R

Ron de Bruin

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

Top