E
Erik Wynn
Hi,
I am trying to do some "simple" counting with Excel using array functions.
Perhaps there is a much easier way to do this, but it's not jumping out at
me. I have looked at the postings, and see the first half of what I need,
using the FREQUENCY and MATCH functions, and this has got me started, but
I'm not sure how to do the next step...
I need to count the number of unique items in a range based on a condition
in a parallel range.
For example, to count the number of unique fruit items in the list:
FRUIT QTY CUSTOMER
-----------------------
apple 4 Tim
orange 4 Jennifer
apple 5 Mike
pear 3 Jennifer
pear 6 Veronica
banana 1 Flo
pear 2 Jennifer
Assume FRUIT_RANGE, QTY_RANGE, and CUSTOMER_RANGE are defined
appropriately.
So,
{=SUM(IF(FREQUENCY(MATCH(FRUIT_RANGE,FRUIT_RANGE,0),MATCH(FRUIT_RANGE,FRUIT_
RANGE,0))>0,1))} will yield 4 (count of {apple, orange, pear, banana}). But
now,
1. How to calculate the number of unique fruit items in the list when AMT
Jennifer?
3. How to calculate the number of unique fruit items in the list ordered by
Jennifer when AMT >= 4?
Thanks for your help!
Erik
I am trying to do some "simple" counting with Excel using array functions.
Perhaps there is a much easier way to do this, but it's not jumping out at
me. I have looked at the postings, and see the first half of what I need,
using the FREQUENCY and MATCH functions, and this has got me started, but
I'm not sure how to do the next step...
I need to count the number of unique items in a range based on a condition
in a parallel range.
For example, to count the number of unique fruit items in the list:
FRUIT QTY CUSTOMER
-----------------------
apple 4 Tim
orange 4 Jennifer
apple 5 Mike
pear 3 Jennifer
pear 6 Veronica
banana 1 Flo
pear 2 Jennifer
Assume FRUIT_RANGE, QTY_RANGE, and CUSTOMER_RANGE are defined
appropriately.
So,
{=SUM(IF(FREQUENCY(MATCH(FRUIT_RANGE,FRUIT_RANGE,0),MATCH(FRUIT_RANGE,FRUIT_
RANGE,0))>0,1))} will yield 4 (count of {apple, orange, pear, banana}). But
now,
1. How to calculate the number of unique fruit items in the list when AMT
2. How to calculate the number of unique fruit items in the list ordered by
Jennifer?
3. How to calculate the number of unique fruit items in the list ordered by
Jennifer when AMT >= 4?
Thanks for your help!
Erik