Counting values and returning the count and the values

Occasional Visitor

I am trying to figure if there is a way to count a specific text value from a drop-down in a row or specific cells in a row and return the count along with the value.

for example, I would like the function to return 1 Orange, 2 purple from the following data:

 OrangeName 1 PurpleName 2 PurpleName 3


and in this case, I would like the function to return 1 Red, 1 Yellow, and 2 green from the following data.

 RedName 1 YellowName 2 GreenName 3 GreenName 4
1 Reply

@rat_excel Why not return " 1 Name 1", " 1 Name 2" and "1 Name 3" also, from your first example. How should a formula differentiate between names (to be ignored) and colors? Perhaps best to upload a file with an example that resembles your real life situation.