Friggin_Lazy
asked on
COUNTIF
Hello Everyone
I have a sheet with data.. example
Column 1 Column 2
Apple 1 Pear 1
Apple 2 Pear 2
Apple 1 Pear 1
Apple 3 Pear 6
Apple 1 Pear 7
Another Sheet With:
Column 1 Column 2
Apple 1 2
Apple 2 1
Apple 3 1
Apple 4 1
Is basically looking at column 2 of sheet 1 to determine how many unique entries
belong to Apple 1 etc...
I hope I made sense.
I have a sheet with data.. example
Column 1 Column 2
Apple 1 Pear 1
Apple 2 Pear 2
Apple 1 Pear 1
Apple 3 Pear 6
Apple 1 Pear 7
Another Sheet With:
Column 1 Column 2
Apple 1 2
Apple 2 1
Apple 3 1
Apple 4 1
Is basically looking at column 2 of sheet 1 to determine how many unique entries
belong to Apple 1 etc...
I hope I made sense.
Your example seems faulty. There are 3 'Apple 1' not 2.
As Martin stated above, the count for Apple 1 seems incorrect in your example as there are three listed. However, assuming that the number 2 is just a typo, I think the following formula will do what you need.
=COUNTIF(Sheet1!A2:B6,A2)
I've attached a spreadsheet with your first set of columns in Sheet1 and the second set of columns (with formulas) on Sheet2. Note - You can use COUNTIFS in place of COUNTIF and still get the same results. The upside to COUNTIFS is you can list multiple criteria.
Hope this helps!
COUNTIF.xlsx
=COUNTIF(Sheet1!A2:B6,A2)
I've attached a spreadsheet with your first set of columns in Sheet1 and the second set of columns (with formulas) on Sheet2. Note - You can use COUNTIFS in place of COUNTIF and still get the same results. The upside to COUNTIFS is you can list multiple criteria.
Hope this helps!
COUNTIF.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi
Another option..
=COUNT(IF(FREQUENCY(IF(She et1!$A$2:$ A$6=A2,MAT CH(Sheet1! $B$2:$B$6, Sheet1!$B$ 2:$B$6,0)) ,ROW(Sheet 1!$A$2:$A$ 6)-ROW(She et1!$A$2)+ 1),1))
Array formula. Confirmed with CTRL + SHIFT + ENTER
Kris
Another option..
=COUNT(IF(FREQUENCY(IF(She
Array formula. Confirmed with CTRL + SHIFT + ENTER
Kris
ASKER
Thank You Dave! This is exactly what I was looking for. I also appricate the attachment as an example!