The most frequent text

In the pre­vi­ous post, I was talk­ing about a dom­i­nant, which is the most fre­quent num­ber. Today, we are going to find the most fre­quent text.

Most fre­quent text 

This task is a bit hard­er, because the MODE func­tion that we used pre­vi­ous­ly needs num­bers. It means that we have to con­vert text into num­bers. To do so, we can use the MATCH func­tion. It means that we will be look­ing for our whole text in our whole text. We want the exact match (Fig. 1)

MATCH function to look for the exact match
Fig. MATCH func­tion to look for the exact match

While using the MATCH func­tion, Excel starts cal­cu­la­tions from the top. It means that each pup­py in the range is refer­ring to the first one on the list, which is on the first posi­tion is pre­sent­ed as 1 (Fig. 2)

uppy gets number 1
Fig. 2 Pup­py gets num­ber 1

Look­ing at the sec­ond exam­ple, the first kit­ten is in posi­tion num­ber 2, so each kit­ten will refer to the same num­ber (Fig. 3)

Kitten gets number 2
Fig. 3 Kit­ten gets num­ber 2

Now, that we have our text con­nect­ed to num­bers, we can add the MODE.MULT func­tion to return the most fre­quent num­bers, i.e. posi­tions of text (Fig. 4)

=MODE.MULT(MATCH(A2:A9,A2:A9,0))

 MODE.MULT function to return the most frequent numbers
Fig. 4 MODE.MULT func­tion to return the most fre­quent numbers

And we have the results (Fig. 5)

Results
Fig. 5 Results

Since we have the posi­tions, we can add the INDEX func­tion to return text con­nect­ed to those posi­tions (Fig. 6)

=INDEX(A2:A9,MODE.MULT(MATCH(A2:A9,A2:A9,0)))

INDEX function to return text
Fig. 6 INDEX func­tion to return text

Just like that we have our solu­tions in the Dynam­ic Array Excel (Fig. 7)

Solutions in Dynami Array
Fig. 7 Solu­tions in Dyna­mi Array

In the clas­sic Lega­cy Excel, we should select more cells and use the Ctrl + Shift + Enter key com­bi­na­tion to put our results in all cells (Fig. 8)

Key combination
Fig. 8 Key combination

How­ev­er, we are in DA Excel, so we have a sim­pler solu­tion. At the end, we want to check what hap­pens when the text appears only once in a range. We can see that the MODE.MULT func­tion returns the #N/A error (Fig. 9)

 #N/A error
Fig. 9 #N/A error

When text appears the same num­ber of times, in our case it’s cat and dog, the MODE.MULT func­tion will return those results (Fig. 10)

Results
Fig. 10 Results

https://www.youtube.com/watch?v=MpdrAz_ZNdo

The most frequent number

Today, we want to find the most fre­quent value/number.

Most fre­quent number

From sta­tis­ti­cal point of view, we want to find a dom­i­nant. This task is quite easy in Excel, how­ev­er there are some nuances. It’s easy thanks to the MODE func­tion. We can use it to find a sin­gle dom­i­nant. In this func­tion, we just select the range, and Excel will quick­ly cal­cu­late it for us (Fig. 1)

=MODE(A2:A9)

MODE function
Fig. 1 MODE function

We have to remem­ber that while using the MODE or MODE.SNGL func­tion, Excel will return only one num­ber. It means that we can­not be sure that only this num­ber is the most fre­quent one. There is a way out, as we also have the MODE.MULT func­tion (Fig. 2)

=MODE.MULT(A2:A9)

 MODE.MULT function
Fig. 2 MODE.MULT function

After using this func­tion, we can see that in our exam­ple there are two most fre­quent num­bers: 5 and ‑1. The MODE func­tion showed only the num­ber that appeared at the begin­ning of the range. When I change the order of the two first num­bers in the range, we can see that now the MODE.SNGL func­tion returns ‑1. The MODE.MULT func­tion will still return two num­ber, how­ev­er in dif­fer­ent order (Fig. 3). 

Different order of numbers
Fig. 3 Dif­fer­ent order of numbers

When we use the MODE.SNGL func­tion in a range where there isn’t any most fre­quent num­bers and each num­ber occurs only once, the func­tion will return the #N/A error. In our range of Wages, each wage appears only once (Fig. 4)

 #N/A error
Fig. 4 #N/A error

https://www.youtube.com/watch?v=XZs8lwM7Oqg