Counting Cells based on separate column with Index/Match

excelmag

New Member
Joined
Feb 14, 2018
Messages
6
I have a table that has group/division names, employee names, and then tracking an attendance measure for multiple days throughout the year. I'm trying to create a table at the top so that division leads can type in the day and see how many people they had check in that day. Checkins start with numbers (only important because if someone calls in sick, they will be listed as "sick," "vacation," etc. and not start with a number).
I've been trying to build a formula (Excel 2010) for each of the groups, but am having problems merging it with the countif function
So far, I have =countif(index(J8:AN108,0,MATCH(J4,J7:AN7,0)))
the problem being that it counts all the attendees for the day and I haven't been able to figure out how to get it to count each group separately based on the group name in column B.

Anyone have suggestions?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
MOCK UP TABLE(bold is where
the formulas DateDiamondEmeraldAmethystRubySapphireTotal
should go) 3-Jan000000
MTWRFSSMTWR
GroupLastFirstMTWR 1234567891011
DiamondAndersonJAxx x1 greenx
EmeraldBilboJB x 1 yellowx
AmethystCampbellJC xx xx
RubyDavisJD x 2 redx
SapphireEllisJExx x1 redx
SapphireFredricksonJF x 2 yellowx
RubyGillisJG xx xx
AmethystHughesJH x x
EmeraldIgnominiousJI x 1 yellowx
DiamondJacksonJJ xx xx

<colgroup><col><col span="2"><col><col span="3"><col><col span="4"><col><col><col><col span="4"></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Hi,

A bit confused about the usage of index/match within countif.
If you want to count items based on multiple criteria (as that's what your aiming for) take a look at COUNTIFS.
Share a mockup of data and your draft report and we can help somewhat extensive.
 
Upvote 0
So sorry, I thought I had attached a mockup!
The 0s are where I've been trying to insert the formula (obviously I would adjust the formula for the Emerald division to be column K, Amethyst to be column L, etc.)





Census
DateDzEzAzRzSzTotal
3-Jan000000
MTWRFSSMTWR
DivisionLastFirstMTWR 1234567891011
DzAndersonJAxx x1 greenx
EzBilboJB x 1 yellowx
AzCampbellJC xx xx
RzDavisJD x 2 redx
SzEllisJExx x1 redx
SzFredricksonJF x 2 yellowx
RzGillisJG xx xx
AzHughesJH x x
EzIgnominiousJI x 1 yellowx
DzJacksonJJ xx xx

<colgroup><col><col span="2"><col><col span="3"><col><col span="4"><col><col><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0
Due to your newness and the presented data the system auto-moderated your later posts
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,938
Latest member
Aaliya13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top