Question: I have a list of about 5K lines that I want to count occurrences for each item. 

There are about 300 - 400 different items within this list. 

Instead of typing up 300+ unique formulas looking like 

```
=COUNTIF(A1:A5000,"A")
=COUNTIF(A1:A5000,"B")
=COUNTIF(A1:A5000,"C")
=COUNTIF(A1:A5000,"D")
=COUNTIF(A1:A5000,"E")
ETC to 300...

```

, is there a way I could accomplish this goal with some sort of enhanced formula?

Below is a list example that I borrowed from a previous posted question because it demonstrates what I am trying to accomplish however in my case I have 300 to 400 different items not just A, B, C, D, & E : 

"I have a list of items that looks like this:"

```
A
B
C
A
A
B
D
E
A

```

"Now I want to count the number of occurrences of each item. The result should look like this:"

```
A 4
B 2
C 1
D 1
E 1

```

Credit to RoflcoptrException for posting the original question.

Answer: 
You can use the "Plain Table 2" style (your example looks like it). 

1. Create your table, then go to Table Design. Select "Plain Table 2" among the Table Styles.

[![Plain Table 2 style](https://i.stack.imgur.com/CQlji.png)](https://i.stack.imgur.com/CQlji.png)

2. Select the table, then uncheck all the options but "Header Row" under Table Style Options.

[![Table Style Options](https://i.stack.imgur.com/lRjjU.png)](https://i.stack.imgur.com/lRjjU.png)

3. The table will look like the image below.

[![enter image description here](https://i.stack.imgur.com/jnzBd.png)](https://i.stack.imgur.com/jnzBd.png)
1. Select your header
	* in "home" tab - "paragraph" group - open the drop down next to table border icon and select "borders and shading"

[![enter image description here](https://i.stack.imgur.com/TaQOT.png)](https://i.stack.imgur.com/TaQOT.png)

* remove vertical borders and horizontal one inside the table
	2. select your table's body and repeat the steps

[![enter image description here](https://i.stack.imgur.com/t4X1K.png)](https://i.stack.imgur.com/t4X1K.png)