' Objective: showing the formula in a given cell ' ' Author: yuxing.yan at Canisius dot edu ' Date : 9/1/2012 ' ' Step 1: highlight and copy this textfile ' Step 2: after launching Excel, click "developer" ' Step 3: click "Visual Basic" ' Step 4: Click "Insert " then "module" ' Step 5: right click your mouse, then "paste" ' Step 6: click "File", then "Close and Return to Microsoft Excel" ' ' Now you are ready to use this function ' Example: ' in A1, you type =fv(0.10,1,0,100) ' in A3, you type =showformula(A1) ' ' Note: when saving, use Excel Macro-enabled workbook (*.xlsm) Function showFormula(x As Range) If x.HasFormula Then showFormula = x.Formula Else: showFormula = x End If End Function