How can I split comma-separated values in a cell and then count occurrences in Excel?
21:16 30 Mar 2026

I am learning Excel and trying to work with data that contains multiple values in a single cell separated by commas.

For example, I have a cell like this:

A1: apple,banana,apple,orange

My goal is to count how many times each item appears.

I understand that:

- SPLIT can separate the values into different cells

- COUNTIF can count occurrences in a range

What I tried:

I used SPLIT to separate the values, but I am unsure how to correctly apply COUNTIF afterward to count each item.

What I am trying to achieve:

A result like:

apple = 2

banana = 1

orange = 1

How can I properly combine SPLIT and COUNTIF to achieve this?

excel excel-formula