In this guide, we’ll see how to extract all possible data from a survey with open-ended questions using Excel. The survey includes a very specific open-ended question: “What skill would you like to improve this year?”

The challenge is to make sense of the open-ended responses to create clusters around the most important themes, and to analyze the needs identified in the survey in detail. The sample database will help us establish a framework for defining the activities to be organized in the coming years.
The file is compatible only with the 365 version, but you can always use it in the online version of Excel, which is completely free!
The source files for extracting data from a list
In this case, we need two tables: TBL and TBL_OUT.
Our source table, called TBL, contains all the open-ended responses in a single column.

TBL_OUT is the table where we enter all the words we’re not interested in (one column)

The second table is necessary because our process involves “breaking down” each response into individual words. We’ll therefore end up with all the articles like “i, il, la” and other insignificant words such as “skills, abilities, improve.” In our final output, we want to avoid including these words, since they add nothing to the analysis.
EXCEL TRAINING
Want to bring these skills to your team?
I design Excel training paths based on your goals, the participants' level and the cases you actually face at work.

Marco Filocamo · Microsoft Excel MVP
Do you have a specific file or process to improve? Explore Excel consulting →
How to extract all the words from various cells in Excel
We can see that, among the keywords, PowerPoint and Excel appear to be among the most in-demand skills. We also have words like “analysis,” “development,” and “team” that might provide us with some additional information.
However, the procedure for extracting all the words in an Excel table is quite complicated:

=LET(words,UNIQUE(TOCOL(TEXTSPLIT(TEXTJOIN("|",TRUE,TBL[ANSWERS])," ","|",,,""))),
words_filter,FILTER(words,(words<>"")*(ISNA(XMATCH(words,TBL_OUT[WORDS])))), words_calc,COUNTIF(TBL[ANSWERS],"* "&words_filter&" *")+ COUNTIF(TBL[ANSWERS],words_filter&"*")+COUNTIF(TBL[ANSWERS],"*"&words_filter),
words_ranking,SORT(HSTACK(words_filter,words_calc),2,-1),words_ranking)
As we mentioned, this formula is quite complex and uses several Excel functions. Let’s look at the individual steps in detail, keeping in mind that the function LET is used to assign names to various expressions that will be used in the formula.
In this case, we’ll have `words` (the words), `words_filter` (the words listed above, excluding those in the table named `TBL_OUT`), `words_calc` (to count how many times the words listed above appear in our responses), and `words_ranking` (which ranks them from most common to least common).
Let’s look at each component in detail, starting with ` words`:
=LET(words,UNIQUE(TOCOL(TEXTSPLIT(TEXTJOIN("|",TRUE,TBL[ANSWERS])," ","|",,,"")))
- The function TEXTJOIN takes the entire contents of the table, splitting the individual rows with the "|" character. In this case, we would have a single, very long cell containing all the data
- The TEXTSPLIT function is used to split text into words using the "|" character. This is useful for then filtering unique words and calculating the count of each word. The idea of using the TEXTSPLIT function dynamically comes from this interesting video by Wyn Hopkins
So far, we’ve taken all the words and split them into individual rows. For each row, we’ll have a series of cells containing the individual words separated from one another. However, we need to ensure they’re all in the same column:
- The TOCOL function allows us to return an array in column format only. So in this case, the function will create a single, very long column containing all the words seen previously. There is a difference compared to before, because now all the words are separated into individual cells and can therefore be reviewed further
- The UNIQUE function retrieves all these values and returns only the unique ones, so we have all the words, separated by a space, included in the previous answers
Now let’s look at ` words_filter`:
words_filter,FILTER(words,(words<>"")*(ISNA(XMATCH(words,TBL_OUT[WORDS]))))
- The function FILTER is used to filter the words found earlier, in order to remove any empty cells or words that are already present in the column TBL_OUT[WORDS]. Multiplication by * is necessary because we want both conditions to be satisfied; otherwise, we could have used a +. If you want to learn more about the FILTER function, take a look here
- The XMATCH function is used to compare each filtered word with those in the TBL_OUT[WORDS] column and return a Boolean value indicating whether the word is already present or not. The XMATCH function works like the MATCH function, returning the relative position of a string within a range, in this case, it would only do so if the word were present in the other table. The adapted formula comes from this interesting video by Mike Girvin
- The function ISNA is used to verify, with a TRUE/FALSE, the result of the function XMATCH. Therefore, it will be true if the word NOT exists in the table TBL_OUT (since in this case we’ll get an error in the previous function with XMATCH), while it will be false if the word EXISTS in the second table (because the result will be the word’s position in the overall table)
- To simplify: in this case, `words_filter` retrieves all words that are either not empty or not present in the table named `TBL_OUT`, which we use precisely to filter the information we need. The formula also works if you just use `TBL_OUT`, but for readability, I think it makes sense to keep the header
Now let’s see how to count how many times the words appear in our array using ` words_calc`:
words_calc,COUNTIF(TBL[ANSWERS],"* "&words_filter&" *")+ COUNTIF(TBL[ANSWERS],words_filter&"*")+COUNTIF(TBL[ANSWERS],"*"&words_filter)
- The function COUNTIF is used to count how many times each filtered word appears in the column TBL[ANSWERS]. There are three different calls to COUNTIF that account for the word with a space to the left and right, or cases where the word is the first (words_filter&"*") or the last in the string ("*"&words_filter). This is useful for capturing all words by considering the various possible combinations
At this point, all that’s left is to create an array, which must also be sorted, called ` words_ranking`:
words_ranking,SORT(HSTACK(words_filter,words_calc),2,-1),words_ranking)
- HSTACK creates an array containing both our filtered words (words_filter) and their respective counts (words_calc).
- The function SORT is used to sort the list of filtered words based on the count of each word. By entering 2, we specify that we want them sorted by their count (words_calc), while -1 means we want them in descending order.
Finally, we insert `words_ranking`, since that is what we want to display: specifically, a single array containing the words and their respective counts, ignoring all the intermediate steps described above.
A further refinement of the formula could have been the inclusion of headers, in this case, it would have been sufficient to include them using the various possible combinations of VSTACK and HSTACK.
How to Sort in Excel Using Various Conditions
If, on the other hand, we wanted to first sort in descending order and then list all skills in alphabetical order, the formula would be slightly different:

=LET(words,UNIQUE(TOCOL(TEXTSPLIT(TEXTJOIN("|",TRUE,TBL[ANSWERS])," ","|",,,""))),
words_filter,FILTER(words,(words<>"")*(ISNA(XMATCH(words,TBL_OUT[WORDS])))), words_calc,COUNTIF(TBL[ANSWERS],"* "&words_filter&" *")+ COUNTIF(TBL[ANSWERS],words_filter&"*")+COUNTIF(TBL[ANSWERS],"*"&words_filter),
words_ranking,SORTBY(HSTACK(words_filter,words_calc),words_calc,-1,words_filter,1),words_ranking)
In this case, `words_ranking` would require the function `SORTBY` to first sort our array by `words_calc` (which is the second column) in descending order (-1) and then sort by `words_filter` (the words, i.e., the first column) in ascending order (1).
I hope you found this guide helpful! I think this can be an excellent method for quickly retrieving information from large, text-heavy databases, although we’ll always need to step in to truly make sense of the data.
In this sense, the file can help with an initial screening, but we’ll then have to determine whether it makes sense to analyze only “Power” or “Power BI,” assessing how word combinations have a significant impact even in the final part of the analysis.
In this regard, always remember that the COUNTIF function, as shown in the guide, allows you to highlight all instances where a specific string appears in a cell, thanks to the use of “*,” which matches any value.
Conclusion
TEXTJOIN, TEXTSPLIT, TOCOL and UNIQUE turn open answers into a list of single words, and FILTER with XMATCH removes the words you want to ignore. COUNTIF with the * wildcard then shows how often each word appears.
