JBloggs
JBloggs

Reputation: 27

COUNTIFS yesterday?

So I currently have the formula (shown below) that lets me count records with yesterday's date on.

=COUNTIFS(A100:A6228,"="&TODAY()-1)

The problem with this formula is that on a Monday when I go to use it, I get a total of 0 because the day before is Sunday.

I'm looking for a solution that uses weekdays only (mon-fri). So when I go to use the formula on Monday I get records from the Friday before.

Thanks in advance!

Upvotes: 0

Views: 2833

Answers (1)

Mrig
Mrig

Reputation: 11702

Instead of

TODAY()-1

use

WORKDAY(TODAY(),-1)

Upvotes: 2

Related Questions