ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date - I would like to skip weekends in a date range (https://www.excelbanter.com/excel-worksheet-functions/181963-re-date-i-would-like-skip-weekends-date-range.html)

Teethless mama

Date - I would like to skip weekends in a date range
 
Try this:

=SUMPRODUCT(--('Ser Data'!A7:A2028=WORKDAY(TODAY(),-1)),--('Ser
Data'!B7:B2028="s"),'Ser Data'!C7:C2028)


"confused" wrote:

I have a formula that takes information from another sheet based on
yesterdays date. It works great except on Monday's where yesterdays date is
Sunday which has no data. We don't work on Saturday or Sunday but I want to
retreive Friday's information on Monday.
Is there a way to select the prior weekday (instead of the prior day) and
skip the weekends.

Here is the formula I am currently using
=SUMPRODUCT(--('Ser Data'!A7:A2028=TODAY()-1),--('Ser
Data'!B7:B2028="s"),'Ser Data'!C7:C2028)

Thank you
Confused



All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com