View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default formula to count text entries and return text with most entries

On Wednesday, June 20, 2012 9:59:15 PM UTC-5, Reppy wrote:
Hi all

I need to create a formula that will look down a column of text (e.g. apple, apple, apple, pear, orange) and not just count but return the actual entry that has been entered most -above would obviously be "apple"

I believe i would not to create an array formula but most formulas seem to relate to numbers or want to convert text to numbers. I just want the formula to display the word entered most in the relevant column.

Regards to all

Reppy


modify for column instead of row and enter using CSE Ctrl Shift Enter

=INDEX(B2:K2,MATCH(COUNTIF(B2:K2,B2:K2), COUNTIF(B2:K2,B2:K2),0)) & " ("&COUNTIF(B2:K2,B2:K2)&" times)"

or

=INDEX(D2:D2500,MATCH(MAX(COUNTIF(D2:D2500,D2:D250 0)),COUNTIF(D2:D2500,D2:D2500),0))