• 503K Members
• 24.4K Online
• 601K Conversations

Visitor

# Rolling Calendar COUNTIFS question

I have a table that lists dates across the top row and a column listing items on the side. Image below.

This is meant to be a rolling calendar, with new dates being added all the time. I'm trying to come up with a formula that counts all the "a"s over the last two weeks by item (not counting the "a"s from weeks before that). If an item appears twice in the first column (eg. "lime" in the image above), the formula should add up all the "a"s in both rows where that item appears.

I've tried various combinations of COUNTIFS with ISOWEEKNUM but no luck so far.

Is something like this possible?

Appreciate any help!

Josh

# Re: Rolling Calendar COUNTIFS question

Given that Sheet1!A1 is blank, you may try this formula:
=SUMPRODUCT(--(INDEX(ItemData,1,
MATCH(INDEX(DateLabels,COUNT(DateLabels))-13,DateLabels,1)):
INDEX(ItemData,COUNTA(ItemLabels),COUNT(DateLabels))="a"))
The defined names are:
DateLabels=Sheet1!\$B\$1:INDEX(Sheet1!\$1:\$1,COUNT(Sheet1!\$1:\$1)+1)
ItemData=Sheet1!\$B\$2:INDEX(Sheet1!\$B:\$XFD,COUNTA(Sheet1!\$A:\$A)+1,COUNT(Sheet1!\$1:\$1)+1)
ItemLabels=Sheet1!\$A\$2:INDEX(Sheet1!\$A:\$A,COUNTA(Sheet1!\$A:\$A)+1)
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies