Matching data and returning count

JJ

New Member
Joined
Feb 18, 2002
Messages
7
I have a set of criteria values in Column A and would like to insert a formula into column B which matches them to a LOOKUP list and counts how many entries DO NOT meet a criteria

E.g. Counting the number of times cat, sat or mat (cell A1:A3) appears in the LOOKUP list when the value is NOT EQUAL to 0


TABLE
A B
1 cat *
2 sat *
3 mat *

LOOKUP LIST
Critria Value
cat 0
mat 1.5
mat 0
sat 2
cat 2
cat 3
sat 2


would return

A B

1 cat 2
2 sat 2
3 mat 1



Anyone help??
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
JJ,

Lets A2:A4 house

{"cat";
"sat";
"mat"}

and F1:G8

{"Criteria","Value";
"cat",0;
"mat",1.5;
"mat",0;
"sat",2;
"cat",2;
"cat",3;
"sat",2}

In B2 enter & copy down:

=SUMPRODUCT(($F$2:$F$8=A2)*($G$2:$G$8>0))

This will give you a count of the co-occurrences of an item with associated non-zero values.

Aladin
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

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