• 465K Members
• 11.5K Online
• 562K Conversations

## Excel: How to return the total number of values in a table column based on date

Occasional Visitor

# Excel: How to return the total number of values in a table column based on date

I have a spreadsheet is meant to track employee vacation days.  The leftmost Column contains employee names, and the Column Headers contains dates for the current scheduling period.

I need to be able to easily total the number of employees who are on vacation on a given date.  This might include regular vacation, stat, etc.  I need to be able to choose a date, and have excel return the number of employees who have vacation on that date.  I do not need to be able to distinguish between the number of employees on stat v. vacation, etc., I just need the total number of employees who will be off that day.

I made up a much smaller example of what I'm talking about and attached a photo so you understand what I am looking for.  Photo 1 shows the spreadsheet itself, and Photo 2 shows the calculator.  B1 is a currently a dropdown list of dates.  The dropdown list comes from the range of dates on the sheet in Photo 1.  B2 is where I want to show the total # of employees who have STAT, VAC, or VAC/STAT.

Thanks in advance for any help!

Highlighted

# Re: Excel: How to return the total number of values in a table column based on date

For such sample data

formula could be

`=SUM(COUNTIF(INDEX(\$C:\$H,0,MATCH(\$K2,\$C\$1:\$H\$1,0)),{"VAC","STAT","VAC/STAT"}))`
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies