Excel, two text fields equal the number 1 per occurance
Assume the data range is A1:B100 with headers in Row1.
With the query name in C2 and item in D2 try the below formula
=SUMPRODUCT(--(A2:A100=C2),--(B2:B100=D2))
--
If this post helps click Yes
---------------
Jacob Skaria
"Don McLean" wrote:
I am in need of help with an excel function. Here is some sample data.
Don coffee
James coffee
Joe tea
Sally coffee
Don tea
Sally tea
Sally tea
Don coffee
I need these two columns to be conditional in that If Don drinks tea that
equals one occurance. The data I need would show that Don drinks tea "1", Don
drinks coffee "2". Sally drinks tea "2", Sally drinks coffee "1".
Can anyone please help me? Thanks.
|