» Adding a Custom Function That Returns the Quarter Number
CATEGORY - Excel Dates
VERSION - All Microsoft Excel Versions
1. Press Alt+F11 to open the VBE.
2. Double-click a Module name in the Personal Macro Workbook, or insert a new Module into the Personal Macro Workbook by selecting Module from the Insert menu.
3. Enter the following code lines into the Module:
Function QuarterNum(Enter_Date)
QuarterNum = DatePart ("q", Enter_Date)
End Function
To test the Custom Function:
1. Select any empty cell and press Shift+F3 to open the Paste Function dialog box.
2. In the User Defined category, select QuarterNum, and then click OK.
3. In the Function Arguments dialog box, enter the address of a cell containing a date, and click OK.

Book Store:
Recommended Books:
- Personal Finance for Dummies
- Preparing the Marketing Plan (Ama Marketing Toolbox Series New Edition)
- Essentials of Accounting and Post Test Booklet 8, Eighth Edition
- Business Plans Kit for Dummies (With CD-ROM)
- Business Analysis with Microsoft Excel (2nd Edition)
- The Interpretation of Financial Statements
No comments have been submitted.

