Find most frequently occuring text in range that consist of multiple rows and colums

后端 未结 2 505
栀梦
栀梦 2021-01-22 22:33

My question is closely related to the following topics:

  • Excel: Find most frequent occurring value in a range?
  • https://exceljet.net/formula/most-frequentl
2条回答
  •  萌比男神i
    2021-01-22 23:10

    =INDIRECT(TEXT(MMULT(CHOOSE({1,2},ROW(MyRange),COLUMN(MyRange))+MOD(ROUNDUP(MATCH(1,0/FREQUENCY(0,1/(1+COUNTIF(MyRange,MyRange))))/COLUMNS(MyRange)^{1,0},0)-1,COLUMNS(MyRange)*ROWS(MyRange)^{1,0}),10^{5;0}),"R0C00000"),0)

    Replace MyRange as required.

    Note that, if you are not using an English-language version of Excel, parts of the above may require amending (the separators within the array constants - {1,2}, {1,0} and {5;0} - and the part "R0C00000" being two such examples).

    Edit: the above is overkill; we can use simply (with CTRL+SHIFT+ENTER):

    =INDIRECT(TEXT(MIN(IF(COUNTIF(Rng,Rng)=MAX(COUNTIF(Rng,Rng)),10^5*ROW(Rng)+COLUMN(Rng))),"R0C00000"),0)

    Regards

提交回复
热议问题