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 www.j-walk.com/ss/excel/files/addpath.htm.

 
Do you have a technology question for this column? Send it to Senior Editor Stanley Zarowin via e-mail at zarowin@mindspring.com 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

SPONSORED REPORT

How to make the most of a negotiation

Negotiators are made, not born. In this sponsored report, we cover strategies and tactics to help you head into 2017 ready to take on business deals, salary discussions and more.

VIDEO

Will the Affordable Care Act be repealed?

The results of the 2016 presidential election are likely to have a big impact on federal tax policy in the coming years. Eddie Adkins, CPA, a partner in the Washington National Tax Office at Grant Thornton, discusses what parts of the ACA might survive the repeal of most of the law.

QUIZ

News quiz: Scam email plagues tax professionals—again

Even as the IRS reported on success in reducing tax return identity theft in the 2016 season, the Service also warned tax professionals about yet another email phishing scam. See how much you know about recent news with this short quiz.