Count in column

sgm1911

New Member
Joined
Jul 10, 2017
Messages
10
I have a column of data:

Apple
Orange
Apple
Apple
Orange
Pear

How would I get excel to count and list out:
3 apple
2 orange
1 pear

I know how to use countif, but that is if I am searching from a list of data.

Sometimes there might be other unknown data inside, so I need to count and list out everything inside the column.

Apple
Orange
Apple
Apple
Orange
Pear
Abcdefg

3 Apple
2 Orange
1 Pear
1 Abcdefg
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
first, create a unique list in Col B then count them in Col C


Excel 2013/2016
ABC
1
2AppleApple3
3OrangeOrange2
4ApplePear1
5AppleAbcdefg1
6Orange
7Pear
8Abcdefg
6
Cell Formulas
RangeFormula
B2{=IFERROR(INDEX($A$2:$A$8, MATCH(0, COUNTIF($B$1:B1, $A$2:$A$8), 0)),"")}
C2{=COUNTIF($A$2:$A$8,B2)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks, but I would like to do this without a unique list, because sometimes I wouldnt know all the values in Column A.

Is there a way to do this? Macro perhaps?
 
Upvote 0
Thanks, but I would like to do this without a unique list, because sometimes I wouldnt know all the values in Column A.

Is there a way to do this? Macro perhaps?

not quite sure what you're after.
both your examples are with a unique list in it

I have a column of data:

Apple
Orange
Apple
Apple
Orange
Pear

How would I get excel to count and list out:
3 apple
2 orange
1 pear

I know how to use countif, but that is if I am searching from a list of data.

Sometimes there might be other unknown data inside, so I need to count and list out everything inside the column.

Apple
Orange
Apple
Apple
Orange
Pear
Abcdefg

3 Apple
2 Orange
1 Pear
1 Abcdefg
 
Upvote 0
Thanks, but I would like to do this without a unique list, because sometimes I wouldnt know all the values in Column A.

Is there a way to do this? Macro perhaps?

Hi,

I think you misunderstood, Alan Y's Post #2 , the formula for B2 (copied down, don't forget to CSE) will provide the "unique" list, you Don't need to know all the items in column A. Then use his formula in C2 (actually, no CSE needed for this formula) copied down to give you the Count of the unique items. Try it to see.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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