MOST FREQUENT RECURRING TEXT / PHRASE

Unlucky

Board Regular
Joined
Dec 3, 2014
Messages
58
Office Version
  1. 2016
Platform
  1. Windows
Most frequent recurring text. I was able to enter the most frequent formula, but I'm having difficulty with the 2nd, 3rd, 4th, and 5th most frequent.

I use column D for a program name ($D$:$D$121)
I use column E for the recurring text I want to search for ($E$2:$E$121)
I use column F for the program name pool ($F$2:$F$14)

Column G ($G$2:$G$14) list the most frequent recurring text {=INDEX($E$2:$E$121,MODE(IF($D$2:$D$121=$F$2,MATCH($E$2:$E$121,$E$2:$E$121,0))))} . . . confirmed with Ctrl+Shift+Enter

Column H ($H$2:$H$14) is the 2nd most frequent recurring text
Column I ($I$2:$I$14) is the 3rd most frequent recurring text
Column J ($J$2:$J$14) is the 4th most frequent recurring text
Column K ($K$2:$K$14) is the 5th most frequent recurring text

Problem: I'm having trouble with entering the formula for columns H, I, J, & K
 
Keep in mind that the actual source data table is over 5000 Rows long, and it would take 20 to 30 minutes each time I wanted to update it by hand jamming it, which would be two to three times a day . . . and anytime my supervisor wanted an updated list; the list is a living document posted on a share point drive. I've worked on the "Open Documents" table and have all the formulas I need, except column A (Cells A4:A22); everything changes automatically (Columns C:P) when the numbers change (Column A). The number change is based on the "Source Data Table" document status (Cells K26:K59) (In actuality the source data is Column AN8:AN5258 on another spreadsheet).

Anyway, all I need is the formula for Column A to report the next number for 'open' documents listed in Column K of the source table. I already have the formula for the first 'document' (Cell A3) but have not been able to figure it out for the 2nd, 3rd, 4th, etc. (Cells A4:A22)) I tried using the formula provided for the original query above, but that appears to only work when reporting in a Row, vice a Column. In actuality, the report may be less than 20 documents, but rarely more than 20, again depending on whether the documents are 'open' or 'closed'.

Here is the reworked "Open Documents" table with the accompanying source table:


TEST LOG FOR FORMULAS.xlsx
ABCDEFGHIJKLMNOP
1OPENDOCUMENTS
2NUMBERLEVELISSUEDCAP DUEPROGRAMISSUED BYSTATUSCOMMENTS
32938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
42938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
52938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
62938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
72938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
82938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
92938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
102938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
112938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
122938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
132938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
142938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
152938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
162938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
172938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
182938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
192938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
202938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
212938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
222938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
23
24SOURCE DATA TABLE
25NUMBERLEVELISSUEDCAP DUEPROGRAMISSUED BYSTATUSCOMMENTS
262938120200005AI10-Sep-2020-Sep-20ABCTomCLOSEDLoose hardware
272938120200006AI12-Sep-2022-Sep-20ABCCharlieCLOSEDInstalled backwards
282938120200007AI12-Sep-2022-Sep-20CDRWilliamCLOSEDLoose hardware
292938120200008AI21-Sep-201-Oct-20QMFWilliamCLOSEDMissing hardware
302938120200008BII22-Sep-202-Oct-20ABCBobOPENInstalled upside down
312938120200008CIII22-Sep-202-Oct-20CRFTomOPENMissing paint
322938120200009AI23-Sep-203-Oct-20CDRGregOPENLoose hardware
332938120200010AI4-Oct-2014-Oct-20QMFTomCLOSEDLoose hardware
342938120200011AI5-Oct-2015-Oct-20WWWWilliamCLOSEDInstalled upside down
352938120200011BII12-Oct-2022-Oct-20WTFCharlieCLOSEDInstalled backwards
362938120200012AI14-Oct-2024-Oct-20CDRBobOPENMissing paint
372938120200013AI3-Nov-2013-Nov-20ABCBobOPENOperator error
382938120200014BII6-Nov-2016-Nov-20ABCBobOPENFailed test
392938120200015AI6-Nov-2016-Nov-20WTFTomOPENLoose hardware
402938120200016AI7-Nov-2017-Nov-20WWWWilliamCLOSEDMissing paint
412938120200016CIII28-Nov-208-Dec-20ILSCharlieOPENInstalled backwards
422938120200017AI29-Nov-209-Dec-20PRTCharlieCLOSEDLoose hardware
432938120200018AI8-Dec-2018-Dec-20ABCBobOPENLoose hardware
442938120200019AI10-Dec-2020-Dec-20CDRGregCLOSEDInstalled backwards
452938120200020AI15-Dec-2025-Dec-20CRFTomCLOSEDLoose hardware
462938120200021AI22-Dec-201-Jan-21CRFWilliamCLOSEDMissing hardware
472938120200022BII30-Dec-209-Jan-21CRFBobCLOSEDInstalled upside down
482938120200023AI30-Dec-209-Jan-21WWWBobCLOSEDMissing paint
492938120200023BII31-Dec-2010-Jan-21ABCWilliamOPENLoose hardware
502938120200024AI7-Jan-2117-Jan-21ILFGregOPENLoose hardware
512938120200025AI12-Jan-2122-Jan-21WTFTomOPENInstalled upside down
522938120200026AI13-Jan-2123-Jan-21ABCTomOPENInstalled backwards
532938120200027AI21-Jan-2131-Jan-21ABCTomOPENMissing paint
542938120200027CIII3-Feb-2113-Feb-21ABCTomOPENMissing hardware
552938120200028AI4-Feb-2114-Feb-21WTFGregOPENInstalled upside down
562938120200029AI13-Feb-2123-Feb-21WWWWilliamOPENMissing paint
572938120200030BII8-Mar-2118-Mar-21ILSBobOPENLoose hardware
582938120200030CIII9-Mar-2119-Mar-21PCFTomOPENLoose hardware
FORMULA TEST
Cell Formulas
RangeFormula
C3:C22C3=IFERROR(INDEX($C$26:$C$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
D3:D22D3=IFERROR(INDEX($D$26:$D$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
E3:E22E3=IFERROR(INDEX($E$26:$E$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
G3:G22G3=IFERROR(INDEX($F$26:$F$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
H3:H22H3=IFERROR(INDEX($H$26:$H$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
K3:K22K3=IFERROR(INDEX($K$26:$K$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
L3:L22L3=IFERROR(INDEX($L$26:$L$58, MATCH(0, IF($A3=$A$26:$A$59, COUNTIF($A$3:$A3, $G$1), ""), 0)),"")
A3:A22A3=IFERROR(INDEX($A$26:$A$58,MODE(IF(($K$26:$K$58=$G$1)*(COUNTIF($G$1,$A$26:$A$58)=0),MATCH($A$26:$A$58,$A$26:$A$58,0)*{1,1}))),"")
E26:E58E26=D26+10
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Ignore this entry. When I first posted this morning (above), it did not appear, so I retyped it. Sorry.
 
Upvote 0
Your sample list simply consists of the same record repeated 19 times. I really can't discern much from that. Let me try a few guesses.

If you're just looking for a list of records with an OPEN status:

Cell Formulas
RangeFormula
C3:F22,H3:H22,A3:A22,K3:L22C3=IF($M3="","",INDEX(C:C,$M3))
M3:M23M3=IFERROR(SMALL(IF($K$26:$K$58=$G$1,ROW($K$26:$K$58)),ROWS($M$3:$M3)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


I used a helper column in column M to avoid using a lot of array formulas, which can slow down the sheet. If you want to avoid the helper column, and if the number in column A is unique, then try:

Cell Formulas
RangeFormula
C3:F22,H3:H22,K3:L22C3=IF($A3="","",VLOOKUP($A3,$A$26:$L$58,COLUMNS($A3:C3),0))
A3:A22A3=IFERROR(INDEX($A$26:$A$58,SMALL(IF($K$26:$K$58=$G$1,ROW($K$26:$K$58)-ROW($K$26)+1),ROWS($A$3:$A3))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.



And if you want the list of open items, sorted by frequency of comments, try:

Cell Formulas
RangeFormula
C3:F21,H3:H21,A3:A22,K3:L21C3=IF($M3="","",INDEX(C:C,MOD($M3,1)*10000))
C22:F22,K22:L22,H22C22=IF($M22="","",INDEX(C:C,MOD($M22,1)*1000))
M3:M21M3=IFERROR(LARGE(IF($K$26:$K$58=$G$1,COUNTIFS($K$26:$K$58,$G$1,$L$26:$L$58,$L$26:$L$58)+ROW($L$26:$L$58)/10000),ROWS($M$3:$M3)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


I can get rid of the helper column here too if you like.
 
Upvote 0
That did it! I used the second option and, as always, you were spot on with a perfect formula! And again, as always, thank you very much! It is genuinely appreciated. ?
 
Upvote 0
I made two 'reserve' tables with the other two formulas, . . . . . just in case the one I used doesn't work as well as planned; always have a back-up plan! Again, thanks for your help, you're awesome!

? ? ?
 
Upvote 0
It's always nice to have options! I thought of a minor issue with the 3rd formula. Here's a fixed version if you ever need it:

Book1
ABCDEFGHIJKLM
1OPENDOCUMENTS
2NUMBERLEVELISSUEDCAP DUEPROGRAMISSUED BYSTATUSCOMMENTS
32938120200030CIII09-Mar-2119-Mar-21PCFTomOPENLoose hardware7001.006
42938120200030BII08-Mar-2118-Mar-21ILSBobOPENLoose hardware7001.006
52938120200024AI07-Jan-2117-Jan-21ILFGregOPENLoose hardware7001.005
62938120200023BII31-Dec-2010-Jan-21ABCWilliamOPENLoose hardware7001.005
72938120200018AI08-Dec-2018-Dec-20ABCBobOPENLoose hardware7001.004
82938120200015AI06-Nov-2016-Nov-20WTFTomOPENLoose hardware7001.004
92938120200009AI23-Sep-2003-Oct-20CDRGregOPENLoose hardware7001.003
102938120200029AI13-Feb-2123-Feb-21WWWWilliamOPENMissing paint4006.006
112938120200027AI21-Jan-2131-Jan-21ABCTomOPENMissing paint4006.005
122938120200012AI14-Oct-2024-Oct-20CDRBobOPENMissing paint4006.004
132938120200008CIII22-Sep-2002-Oct-20CRFTomOPENMissing paint4006.003
142938120200028AI04-Feb-2114-Feb-21WTFGregOPENInstalled upside down4005.006
152938120200025AI12-Jan-2122-Jan-21WTFTomOPENInstalled upside down4005.005
162938120200016CIII28-Nov-2008-Dec-20ILSCharlieOPENInstalled upside down4005.004
172938120200008BII22-Sep-2002-Oct-20ABCBobOPENInstalled upside down4005.003
182938120200014BII06-Nov-2016-Nov-20ABCBobOPENFailed test1013.004
192938120200013AI03-Nov-2013-Nov-20ABCBobOPENOperator error1012.004
202938120200027CIII03-Feb-2113-Feb-21ABCTomOPENMissing hardware1004.005
212938120200026AI13-Jan-2123-Jan-21ABCTomOPENInstalled backwards1002.005
22        
23
24SOURCE DATA TABLE
25NUMBERLEVELISSUEDCAP DUEPROGRAMISSUED BYSTATUSCOMMENTS
262938120200005AI10-Sep-2020-Sep-20ABCTomCLOSEDLoose hardware
272938120200006AI12-Sep-2022-Sep-20ABCCharlieCLOSEDInstalled backwards
282938120200007AI12-Sep-2022-Sep-20CDRWilliamCLOSEDLoose hardware
292938120200008AI21-Sep-2001-Oct-20QMFWilliamCLOSEDMissing hardware
302938120200008BII22-Sep-2002-Oct-20ABCBobOPENInstalled upside down
312938120200008CIII22-Sep-2002-Oct-20CRFTomOPENMissing paint
322938120200009AI23-Sep-2003-Oct-20CDRGregOPENLoose hardware
332938120200010AI04-Oct-2014-Oct-20QMFTomCLOSEDLoose hardware
342938120200011AI05-Oct-2015-Oct-20WWWWilliamCLOSEDInstalled upside down
352938120200011BII12-Oct-2022-Oct-20WTFCharlieCLOSEDInstalled upside down
362938120200012AI14-Oct-2024-Oct-20CDRBobOPENMissing paint
372938120200013AI03-Nov-2013-Nov-20ABCBobOPENOperator error
382938120200014BII06-Nov-2016-Nov-20ABCBobOPENFailed test
392938120200015AI06-Nov-2016-Nov-20WTFTomOPENLoose hardware
402938120200016AI07-Nov-2017-Nov-20WWWWilliamCLOSEDMissing paint
412938120200016CIII28-Nov-2008-Dec-20ILSCharlieOPENInstalled upside down
422938120200017AI29-Nov-2009-Dec-20PRTCharlieCLOSEDLoose hardware
432938120200018AI08-Dec-2018-Dec-20ABCBobOPENLoose hardware
442938120200019AI10-Dec-2020-Dec-20CDRGregCLOSEDInstalled backwards
452938120200020AI15-Dec-2025-Dec-20CRFTomCLOSEDLoose hardware
462938120200021AI22-Dec-2001-Jan-21CRFWilliamCLOSEDMissing hardware
472938120200022BII30-Dec-2009-Jan-21CRFBobCLOSEDInstalled upside down
482938120200023AI30-Dec-2009-Jan-21WWWBobCLOSEDMissing paint
492938120200023BII31-Dec-2010-Jan-21ABCWilliamOPENLoose hardware
502938120200024AI07-Jan-2117-Jan-21ILFGregOPENLoose hardware
512938120200025AI12-Jan-2122-Jan-21WTFTomOPENInstalled upside down
522938120200026AI13-Jan-2123-Jan-21ABCTomOPENInstalled backwards
532938120200027AI21-Jan-2131-Jan-21ABCTomOPENMissing paint
542938120200027CIII03-Feb-2113-Feb-21ABCTomOPENMissing hardware
552938120200028AI04-Feb-2114-Feb-21WTFGregOPENInstalled upside down
562938120200029AI13-Feb-2123-Feb-21WWWWilliamOPENMissing paint
572938120200030BII08-Mar-2118-Mar-21ILSBobOPENLoose hardware
582938120200030CIII09-Mar-2119-Mar-21PCFTomOPENLoose hardware
59
Sheet4
Cell Formulas
RangeFormula
C3:F21,H3:H21,A3:A22,K3:L21C3=IF($M3="","",INDEX(C:C,MOD($M3,1)*10000))
C22:F22,K22:L22,H22C22=IF($M22="","",INDEX(C:C,MOD($M22,1)*1000))
M3:M21M3=IFERROR(LARGE(IF($K$26:$K$58=$G$1,COUNTIFS($K$26:$K$58,$G$1,$L$26:$L$58,$L$26:$L$58)*1000+MATCH($L$26:$L$58,$L$26:$L$58,0)+ROW($L$26:$L$58)/10000),ROWS($M$3:$M3)),"")
E26:E58E26=D26+10


Glad I could help! (y)
 
Upvote 0
Understood. Thanks again! You've been an enormous help! :cool:
 
Upvote 0

Forum statistics

Threads
1,215,009
Messages
6,122,674
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top