Self made functions

If you repeat same calculation many times, it is useful to create your own function. As macro is repeating predefined steps, function returns a value.

Capital asset pricing model: expected return equals to risk free rate + (expected return of market portfolio – risk free rate) times beta-factor of the security.

This can be easily calculated in Excel.

Calculating CAPM manually is not an issue, but as said, repeating the same process often takes more time than creating a self made formula.

Function z_ser(fr, mr, b)

z_ser = fr + (mr – fr) * b

End Function

Save the functions in VBA editor under personal workbook, then the formula is available in all your Excel workbooks.

Function is calculating the value for z_ser based on input values rf, mr and b. I used to start my own functions with z_ to sort out my own functions. Another practice is to keep variable names short. It is faster to write and possibility for typing errors is lower than with long names.

Once you are done with VBA and you start to write formula in Excel application side, press fx button

Self made function can be used in the same way as Excel standard functions.

Excel cannot save – check updates

In case Excel is showing some weird errors like Excel cannot save the workbook at all, it is worthy to check that all the updates are implemented correctly.

This is not a waterproofed solution but rather a hint how you can start with this issue.

In Excel select file – account.

Check updates with update now button.

Office (and Excel) was up to date.

To check Windows 10 updates, press square in lower left hand corner and select settings.

Then choose Update & Security.

Press Check for updates.

All updates are in.

If any updates are installed, restart the computer even though it was not required.

If Excel for some reason cannot save document or something is corrupted, updates do not necessarily solve the issue. It is the first thing every user can do to have latest updates both for Windows and Excel.