Count the group that has a value on other column

mark692

Active Member
Joined
Feb 27, 2015
Messages
321
Office Version
  1. 2016
Platform
  1. Windows
hi guys i have this table with 2 column, Column Name and Column Fruit Group i want a formula that will count a Fruit Group that has a name on Column Name, is that possible? thanks

Book1
AB
1NameFruit group
2jamesmango
3Jessiemango
4mango
5grapes
6Jessicaorange
7orange
8orange
9MinnieGuava
10gokouGuava
11KlilinGuava
12Guava
13Banana
14Banana
Sheet1



in my example the Fruit Group that has a names are Mango, Orange, Guava, that is 3 group, i want a formula that will give me 3.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
How about

+Fluff New.xlsm
ABCD
1NameFruit group
2jamesmango3
3Jessiemango
4mango
5grapes
6Jessicaorange
7orange
8orange
9MinnieGuava
10gokouGuava
11KlilinGuava
12Guava
13Banana
14Banana
Sheet3
Cell Formulas
RangeFormula
D2D2=SUM(--(FREQUENCY(IF(A2:A14<>"",MATCH(B2:B14,B2:B14,0)),ROW(B2:B14)-ROW(B2)+1)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Just tried a different method

Book1
ABCDEF
1NameFruit group
2jamesmango3
3Jessiemango
4mango
5grapes
6Jessicaorange
7orange
8orange
9MinnieGuava
10gokouGuava
11KlilinGuava
12Guava
13Banana
14Banana
Sheet1
Cell Formulas
RangeFormula
F2F2=SUM(--ISNUMBER(MATCH(ROW($A$1:$A$14),MATCH(IF(ISTEXT($B$2:$B$14)/ISTEXT($A$2:$A$14)=1,$B$2:$B$14),IF(ISTEXT($B$2:$B$14)/ISTEXT($A$2:$A$14)=1,$B$2:$B$14),0),0)))



This formula is dependent when there is only text in both the column. If there is number then it wont work considering ISText Function used
 
Upvote 0
How about

+Fluff New.xlsm
ABCD
1NameFruit group
2jamesmango3
3Jessiemango
4mango
5grapes
6Jessicaorange
7orange
8orange
9MinnieGuava
10gokouGuava
11KlilinGuava
12Guava
13Banana
14Banana
Sheet3
Cell Formulas
RangeFormula
D2D2=SUM(--(FREQUENCY(IF(A2:A14<>"",MATCH(B2:B14,B2:B14,0)),ROW(B2:B14)-ROW(B2)+1)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.

thank you for this! this works :)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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