Filter Out Weekends In Excel

Q. One of my duties is to calculate the number of business days—leaving out Saturdays and Sundays—between two dates and then insert that information in a spreadsheet. Is there a software program which does that?

A. You’re in luck—you don’t need a special program. Excel’s Networkdays worksheet function does it. However, if you did a typical installation of Excel, without Analysis ToolPak, that function will be missing. That’s not a problem, though; it’s easy to install.

First, to check whether the function is in Excel, go to Tools, Add-Ins and this menu will appear:

Place a check next to Analysis ToolPak and click OK . In all likelihood, Windows will report that it must install the function and will ask you to insert the Microsoft Office disk in the CD drive. Once you do that, the installation will take a few minutes. You probably will have to reboot the computer before it will function.

Once Analysis ToolPak is loaded, use this formula: =NETWORKDAYS(A2,B2) . Put the beginning date in one cell and the ending date in the other.

If you want to figure just the spread between two dates, including weekends, enter the formula: =DAYS360(A2,A3) .

More on Excel headers

If you tried to follow Monika Smith’s alternative way to create a faux header in Excel ( JofA, Oct.00, page 122 ) and it didn’t work, don’t blame yourself or Smith. I misstated one small—but significant—instruction. In the final step, where you fill in the info-type box, don’t enter the file’s path and file name. Instead, type filename .

For those who want to use that technique, Smith suggests a shortcut adopted by her firm, Grant Thornton, which often uses the same spreadsheet setup for different clients or even creates master spreadsheets. Simply evoke Save As to store it in a different folder with a different file name. If the original spreadsheet came with the file name function entered in a cell, all you have to is double-click that cell and Excel automatically updates the file path.

But if you want a real header—not one that’s included in a cell, you can get a free add-in at

Do you have a technology question for this column? Send it to Senior Editor Stanley Zarowin via e-mail at or regular mail at the Journal of Accountancy, Harborside Financial Center, 201 Plaza Three, Jersey City, NJ 07311-3881. We regret that we cannot answer letters individually. If a reader’s question is deemed to have sufficiently broad interest, we will answer it in a forthcoming Technology Q&A column.

—The editors


How the election may affect taxation of business income

This report summarizes recent proposals to reform the U.S. business income tax system and considers the path to enactment of any such legislation.


How to Excel pivot a general ledger

The general ledger is a vast historical data archive of your company's financial activities, including revenue, expenses, adjustments, and account balances. J. Carlton Collins, CPA, shows how to prepare data for, and mine data with, PivotTables.


Did you follow 2016’s biggest accounting news?

CPAs will remember 2016 as a year of new standards and new faces. How well did you follow the biggest accounting events? The 7 questions in this quiz will help you find out