Hello,
I have data from cells A1:A76 that I am trying to calculate the most frequent occurrence. The problem I am running into is that the data I have is copied from other sheets and all blank values show up as zero values. I really just need to find the most text occurring in cells A1:A76 and exclude the numbers. Here is the formula I currently have:
=INDEX(A1:A76,MATCH(MAX(COUNTIF($A$1:$A$76,A1:A76)),COUNTIF($A$1:$A$76,A1:A76)))
It is populating 0 as the most frequent occurrence but I want to take those out of the equation and just include the cells that have text.
Any ideas?
Thanks!
[TABLE="width: 240"]
<COLGROUP><COL style="WIDTH: 83pt; mso-width-source: userset; mso-width-alt: 3925" width=110><COL style="WIDTH: 21pt; mso-width-source: userset; mso-width-alt: 995" width=28><COL style="WIDTH: 78pt; mso-width-source: userset; mso-width-alt: 3697" width=104><COL style="WIDTH: 58pt; mso-width-source: userset; mso-width-alt: 2759" width=78><TBODY>[TR]
[TD="class: xl64, width: 110, bgcolor: transparent"]
NAD[/TD]
[TD="class: xl63, width: 28, bgcolor: transparent"] [/TD]
[TD="class: xl63, width: 104, bgcolor: transparent, align: right"]
1[/TD]
[TD="class: xl63, width: 78, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
JAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
2[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
NAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"]
MOST FREQ[/TD]
[TD="class: xl67, bgcolor: transparent"]
COUNT[/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
NAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: #daeef3"]
JAD[/TD]
[TD="class: xl65, bgcolor: #daeef3, align: right"]
4[/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
KAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: #daeef3"]
VAD[/TD]
[TD="class: xl65, bgcolor: #daeef3, align: right"]
4[/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
VAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: #daeef3"] [/TD]
[TD="class: xl65, bgcolor: #daeef3"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
CAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: #daeef3"] [/TD]
[TD="class: xl65, bgcolor: #daeef3"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
VAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
XAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
WAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
VAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
JAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"]
LAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: transparent"]
JAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: transparent"]
VAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: transparent"]
FAD[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: transparent"]
0[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: transparent"]
0[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: transparent"]
QAD[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: transparent"]
JAD[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: transparent"]
0[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: transparent"]
0[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
</TBODY>[/TABLE]
C1: 1 (Adaptable parameter; 1 means the first modus)
C2, control+shift+enter (CSE), not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($A$2:$A$76<>"",IF(1-ISNUMBER($A$2:$A$76+0),
MATCH($A$2:$A$76,$A$2:$A$76,0))),ROW($A$2:$A$76)-ROW($A$2)+1)>=
LARGE(FREQUENCY(IF($A$2:$A$76<>"",MATCH($A$2:$A$76,$A$2:$A$76,0)),
ROW($A$2:$A$76)-ROW($A$2)+1),C1),1))
This counts in the ties of the first modus if any.
C4, CSE and copy down:
Rich (BB code):
=IF($D4="","",INDEX($A$2:$A$76,SMALL(IF(FREQUENCY(IF($A$2:$A$76<>"",
IF(1-ISNUMBER($A$2:$A$76+0),MATCH($A$2:$A$76,$A$2:$A$76,0))),
ROW($A$2:$A$76)-ROW($A$2)+1)=$D4,ROW($A$2:$A$76)-ROW($A$2)+1),
COUNTIF($D$4:D4,D4))))
D4, CSE and copy down:
Rich (BB code):
=IF(ROWS($D$4:D4)<=$C$2,LARGE(FREQUENCY(IF($A$2:$A$76<>"",
IF(1-ISNUMBER($A$2:$A$76+0),MATCH($A$2:$A$76,$A$2:$A$76,0))),
ROW($A$2:$A$76)-ROW($A$2)+1),ROWS($D$4:D4)),"")