SOLVED

Count different texts

New Contributor

Basically I'm working only with column A, where I have several different terms, but they repeat in different amounts. I need to know how many times each of these terms appeared in column A, is there any practical way to do this? Attached just for example, but the actual list is very extense and it would take a lot of time to do it manually

 

Excel 2016

IMG-20220809-WA0048.jpg

7 Replies

@Bielalve 

=COUNT(SEARCH(", "&C3&", ",", "&$A$2:$A$18&", "))

You can try this formula. Enter the formula with ctrl+shift+enter since you don't work with Office365 or 2021.

count.JPG

@Quadruple_Pawn 

For some reason I can't make the formula work, it just returns #name

I'm using Office365 at home

Bielalve_0-1660088698907.png

 

@Bielalve 

Use a pivot table.

 

best response confirmed by Bielalve (New Contributor)
Solution

Hi @Bielalve 

Recentily Microsoft upgrade to Excel's formula language to support dynamic arrays.

Now you cold use this simple way to do this

 

 

 

=UNIQUE(A2:A1812) & " " &COUNTIF(A2:A1812;UNIQUE(A2:A1812))  & "x"

 

or if you need filter nulable results try this other form

 

 

=LET(
           rangecells;A2:A1812;
           uniqList; UNIQUE(rangecells);
           filteredList; FILTER(uniqList;uniqList<>"");
           return; filteredList & " " &COUNTIF(rangecells;filteredList)  & "x";
 return
)

 

 

Icasstti_0-1660102592505.png

 

Hope it help you

 

@Bielalve Use CHOOSE() with UNIQUE() and COUNTIF() for one go. All below solution are included to attach sample file.

=CHOOSE({1,2},UNIQUE(A2:A8),COUNTIF(A2:A8,UNIQUE(A2:A8))& "x")

Harun24HR_0-1660105762973.png

To show result in same cell use-

=UNIQUE(A2:A8)&" "&COUNTIF(A2:A8,UNIQUE(A2:A8))&"x"

For LAMBDA() approach to use custom function via Name Manager, try-

=LAMBDA(inRng,CHOOSE({1,2},UNIQUE(inRng),COUNTIF(inRng,UNIQUE(inRng))& "x"))(A2:A8)

 

@Bielalve 

Do you work with the english version of Excel? Otherwise you would have to translate the formula. You can open the attached file and the result is shown with the formula translated into your language.

Man i learned more with your solution. I never use choose function to combine many arrays, like you did. Thank you for put your contribution.