Index Match to count occurances

kellyp1603

New Member
Joined
Nov 27, 2017
Messages
2
Good Morning,

I am looking for a formula which will match name to name and count how many occurrences of 'x' within a certain range. I am thinking it will be an index match with a count if but i'm struggling to put it together.

I have a list of names and I want to know how many holidays they have used by quarter without having a count if on the same page and looking up to that.

Q1Q2Q3Q4Q1Q2
01/01/201702/01/201703/01/201704/01/201705/01/201706/01/2017
AgentHolidays UsedAgent
Kelly?KellyHPMAM

<colgroup><col><col><col><col><col span="6"></colgroup><tbody>
</tbody>

Any help would be much appreciated!

Thanks
Kelly
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi Kelly, my first instinct would be to use COUNTIF, however I have supplied both the countif and sumproduct method for you. Either of these would be appropriate.
Index and match is more of lookup tool, granted it could be used with multiple criteria, however even then I would probably choose sumproduct or countifs.

=COUNTIF(A1:E1,"=x")
=SUMPRODUCT(--(A1:E1="x"))

If you need any further help, or I have misunderstood the request let me know.
 
Upvote 0
Thank you for coming back to me. My issue is that I have a large amount of data containing the information on 1 sheet and a second sheet which is a summary of the first sheet. Previously I used a count if on the data sheet and a VLOOKUP on the overview sheet to pull back the information. I was hoping to rid the countif on the first sheet and just keep all of my formulas on the overview sheet for tidiness. Sheet 1 contains a list of names then rows containing dates eg row 1 and holidays used in row 2. I want the overview sheet to tell me how many holidays a name has used for each quarter - hope this makes sense!
 
Upvote 0
I see what you have, hopefully the below should suit

=SUMPRODUCT((Sheet1!$A$2:$A$3=$A2)*(Sheet1!$B$2:$F$3="x"))
A2 contains Kelly, but could be replaced with "Kelly" instead of the cell reference if you wish.

on sheet1 I have as below, on sheet2 just a list of names with this formula:

Sheet1
A
B
C
D
E
F
1
01.01.2017
02.01.2017
03.01.2017
04.01.2017
05.01.2017
2
Kelly
x
x
3
Tom
x
x

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,181
Messages
6,123,508
Members
449,101
Latest member
mgro123

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