Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Data Analysis Spreadsheet Basics Spreadsheet Functions & Shortcuts The EDATE Function

How to exclude Saturdays and Sundays while using EDATE?

Do I have to use another function?

1 Answer

Steven Parker
Steven Parker
231,268 Points

You'll probably want to use IF with the WEEKDAY function to test the day of the week and then alter the date to avoid weekends.

I created this function =IF(WEEKDAY(A2,2)>5,"Weekend","") on column B (column A is the date) to identify the weekends. Now I'm trying to figure out how to hide the dates that have Weekend. Thanks for the help!

Steven Parker
Steven Parker
231,268 Points

Now that you have a weekday column, you can apply a column filter.