{"text_format":"1","workbook":"xlsx","n_sheets":2,"sheets":["Getformula into VBA","Using Getformula"],"not_rendered":{"charts":0,"images":2,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Getformula into VBA","index":0,"n_rows":11,"n_cols":4,"rows_kept":11,"cut":false,"hidden":false,"merged":[]}
[]
[]
[null,null,"Instructions","What does this do?"]
["Function getformula(r As Range) As String",null,"Alt+F11","Opens VBA editor"]
["   Application.Volatile",null,"Insert|Module","Opens programming module in VBA"]
["   If r.HasArray Then",null,"Copy/Paste Getformula (to the left) into module"]
["   getformula = \"<-- \" & \" {\" & r.FormulaLocal & \"}\"",null,"Close VBA (it's part of the Excel notebook)"]
["   Else",null,"Save notebook as Macro-Enabled Workbook "]
["   getformula = \"<-- \" & \" \" & r.FormulaLocal"]
["   End If"]
["End Function"]

{"sheet":"Using Getformula","index":1,"n_rows":7,"n_cols":4,"rows_kept":7,"cut":false,"hidden":false,"merged":[[0,0,0,2]]}
["USING GETFORMULA"]
["Principal",165000,null,"To use Getformula"]
["Interest",0.08,null,"1.  Build your financial model.  The model at the left computes the annual"]
["Term",7,"<-- years","payment on a 7-year mortgage at 8%, using the PMT function."]
["Annual payment",{"$f":"PMT(B3,B4,-B2)","v":31691.946235687748},{"$f":"getformula(B5)","v":"<--  =PMT(B3,B4,-B2)"}]
[null,null,null,"2.  In cell C5:  write =getformula(B5) .  This annotates your model using"]
[null,null,null,"Getformula ."]