Excel Dates

Adding a Custom Function That Returns the Quarter Number

To add a custom function to a Module in the Personal Macro Workbook (To learn more about creating a Personal Macro Workbook.

1. Press Alt+F11 to open the VBE.

To calculate the difference between dates:

Image: 

Use the DATEDIF function. The results of the calculation are displayed as days, full months, and full years.

Note: The DATEDIF function is not included in the Insert Function dialog box.