COUNTIFS with index match/vlookup

Yoshiaki

New Member
Joined
Sep 20, 2016
Messages
2
Hi all,

first time in this forum, hope that you could help me.


I have 2 sheets "A" and "B".

on A,

AppleXX
PearXX
OrangeXX
GrapeXX
PeachXX

<tbody>
</tbody>


On B,

NameApplePearOrangeGrapePeach
Jack10011
Peter21200
Daniel14021
John21111
David12000

<tbody>
</tbody>


Is there any countifs + index match formula which i could write on XX on Sheet A, which will count the number people with Apple,Pear...(not SUM of apples) from Sheet B?
*I want something like Countifs(Apple,">0") but with a reference so that next time i could just modify/add the fruit name on Sheet A and it will automatically find from Sheet B.


Thanks!
Yoshi
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Name A1:F6 of B DATA.

In B2 of A enter and copy down:

=SUMIFS(INDEX(DATA,0,MATCH($A2,INDEX(DATA,1,0),0)),INDEX(DATA,0,1),$A2)
 
Upvote 0
Yoshi, Good morning.

Try to use it:

Sheet 1 --> B2 -->

=SUMPRODUCT((SHEET2!$B$1:$F$1=A2)*(SHEET2!$B$2:$F$6>0))

Please, tell us if it worked for you.
I hope it helps.
 
Upvote 0
Name A1:F6 of B DATA.

In B2 of A enter and copy down:

=SUMIFS(INDEX(DATA,0,MATCH($A2,INDEX(DATA,1,0),0)),INDEX(DATA,0,1),$A2)

If you just want to count the records where > 0, then:

=COUNTIFS(INDEX(DATA,0,MATCH($A2,INDEX(DATA,1,0),0)),">0",INDEX(DATA,0,1),$A2)
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,704
Members
449,118
Latest member
MichealRed

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