Adding getformula to your spreadsheet

1 7 0
  • Loading ...
1/1 trang

Thông tin tài liệu

Ngày đăng: 26/11/2018, 09:34

ADDING “GETFORMULA” TO YOUR SPREADSHEET The spreadsheets that accompany the third edition of Financial Modeling all include a short macro that tracks the cell contents I’ve found this macro extraordinarily useful in my work—it allows me to explain (to myself and to my users) what I’ve done in my spreadsheets The macro is dynamic: When you change a spreadsheet by moving something (for example, by adding rows or columns), the macro automatically updates the formulas The initial macro was developed for me by Maja Sliwinski, who was my student at Wharton; a small change was added by Benjamin Czaczkes Adding Getformula to your spreadsheet Open the spreadsheet in which you want the formula to work Push [Alt]+F11 This will open the VBA editor The screen will look something like this: (Depending on all kinds of things, your screen may look different Don’t worry about this.) Hit Insert|Module Now insert the following text into the Module window (just copy/paste from this document): '8/5/2006 Thanks to Maja Function getformula(r As Application.Volatile If r.HasArray Then getformula = "< " & Else getformula = "< " & End If End Function Sliwinski and Beni Czaczkes Range) As String " {" & r.FormulaArray & "}" " " & r.FormulaArray Close VBA window (no need to save) The formula is now part of the spreadsheet and will be saved along with it Good luck, Simon Benninga Benninga@wharton.upenn.edu
- Xem thêm -

Xem thêm: Adding getformula to your spreadsheet, Adding getformula to your spreadsheet

Gợi ý tài liệu liên quan cho bạn

Nhận lời giải ngay chưa đến 10 phút Đăng bài tập ngay