# Using Excel MODE Function to Return a Text Response

Excel’s MODE function is a great tool for returning the most frequently occurring number in a set of numbers. But what if you want to return the most frequently occurring word in a list of words?

## MODE with Numbers

Using the MODE function in Excel is quite simple; you point to a list of numbers and MODE will tell you which number occurs the most often.

In this list, the number “4” appears more often than any other number.

## MODE with Words

As you can see, the MODE function does not work very well when pointing to a list of words.

The function returns a “#N/A” error message.

Not to fear; MODE can be made to return words, but it take the combined efforts of SEVERAL functions, none of which are MODE! (How odd does THAT sound?)

To set the stage, I have created a list of answers to the question, “What is your favorite flavor of ice cream?” I have named this range of 10 responses “Answers”. This will make the formulas a lot prettier.

There are four steps required to compute the final answer. Let’s take them one step at a time.

NOTE: Each of these formulas must work with the data in an array format. Therefore, a CTRL-SHIFT-ENTER is required when finalizing each step. Color-coding has been used to help identify the steps within the steps.

Step 1

Yields: {2;1;1;3;2;2;2;3;1;3}

This step takes each flavor and counts the number of time that flavor appears in the entire list of answers.

Step 2

Yields: 3

This is the number that occurs most frequently in the list generated by Step 1.

Step 3

Yields: 4

This is the position in the list of answers where the first instance of MAX (i.e. 3) occurs.

Step 4

Yields: “Chocolate”

This is the text in the 4th position in the list of Answers.

## The Finished Formula

The finished formula reads as follows:
{"ft_lang_label":"__label__en","ft_lang_prob":0.8813128,"math_prob":0.8006496,"size":2413,"snap":"2022-40-2023-06","text_gpt3_token_len":601,"char_repetition_ratio":0.15276048,"word_repetition_ratio":0.015625,"special_character_ratio":0.23331952,"punctuation_ratio":0.1369863,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9661465,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-04T18:01:03Z\",\"WARC-Record-ID\":\"<urn:uuid:2423ed77-ad73-4670-981f-9aa73c07f714>\",\"Content-Length\":\"64281\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:905155bf-c62f-4f5c-a9c8-69116c326b8e>\",\"WARC-Concurrent-To\":\"<urn:uuid:c05f42c0-96ab-4e70-93a9-9604abae6ca0>\",\"WARC-IP-Address\":\"104.198.174.125\",\"WARC-Target-URI\":\"https://www.bcti.com/2017/01/05/using-excel-mode-function-return-text-response/\",\"WARC-Payload-Digest\":\"sha1:O4R6IQEBMUPCQQTVQBZMC3TPFDVPH325\",\"WARC-Block-Digest\":\"sha1:E7KOP55IB2QYOUBY46TEP3UKVUBNSDMA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500151.93_warc_CC-MAIN-20230204173912-20230204203912-00521.warc.gz\"}"}