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. Highlight the entire table, and select the Design tab under Table Tools.
2. Click on the expand symbol in the lower right of the Borders section of the ruler. The Borders and Shading dialog will open.
3. Click on the Borders tab of the dialog.
4. Click on "None" under Setting.
5. Click on OK. You now have a table with no lines.
6. Highlight the entire first row of the table.
7. Open the Borders and Shading dialog (as in step 2 above).
8. On the Preview section at the right, click both buttons (top and bottom borders) to the left of the preview.
9. Click on OK. You now have lines above and below the titles.
10. Highlight the entire bottom row of the table.
11. Open the Borders and Shading dialog.
12. Click on the bottom-border button at the left side of the preview.
13. Click OK. You now have the borders you want.

EDIT: Found a faster way to do the same thing, but it's still a one-table-at-a-time fix:

1. Follow the previous instructions up to and including step 4.
2. Look over to the right at the preview. Click on the Top and Bottom border buttons only.
3. Click OK. You now have a table with top and bottom borders.
4. Highlight the top row of the table only.
5. Open the Borders and Shading dialog.
6. Click on the bottom border button. This will add a bottom border to the highlighted cell.
7. Click OK. You now have the table formatted as desired.