Excel Formula to Extract Vowels From Text Using TEXTJOIN and MID

📅 Sep 22, 2026 📝 Sarah Miller

Extracting specific character patterns, like vowels, from unstructured text in Excel is a notoriously tedious data-cleansing challenge. While standard funding sources of Excel solutions often rely on complex VBA scripts or manual filtering, combining TEXTJOIN and MID grants users a highly elegant, formula-based alternative that streamlines data parsing. However, this method carries the stipulation that you must use Excel 2019 or Microsoft 365 to access array-handling capabilities. For example, instantly isolating "E, o, u, a" from the string "Excel Formula" demonstrates its precision. Below, we break down the formula syntax and provide a step-by-step implementation guide.

Excel Formula to Extract Vowels From Text Using TEXTJOIN and MID

Excel is widely recognized as a powerhouse for managing numbers, financial models, and structured data tables. However, when it comes to text manipulation, users often find themselves searching for creative ways to perform complex operations. One such fascinating challenge is extracting specific types of characters from a text string-specifically, extracting only the vowels (A, E, I, O, U) from a given word or phrase.

Whether you are performing linguistic analysis, clean-up operations on SKU codes, setting up custom text-parsing tools, or simply building a fun word puzzle, knowing how to isolate vowels is an incredibly useful skill. By combining Excel's modern TEXTJOIN function with the reliable MID function, alongside a few helper array functions, you can build a dynamic formula that extracts all vowels seamlessly without needing complex VBA (Visual Basic for Applications) code.

The Core Methodology

To extract vowels from a text string in Excel, we must break down the process into three logical phases:

  1. Deconstruction: Split the target text string into an array of individual, single characters.
  2. Evaluation: Inspect each individual character to determine if it is a vowel (A, E, I, O, U, and optionally their uppercase/lowercase counterparts).
  3. Reconstruction: Filter out the non-vowels and stitch the remaining vowels back together into a single, cohesive text string.

Historically, this required cumbersome nested formulas or array formulas that required pressing Ctrl + Shift + Enter (CSE). In modern versions of Excel (Excel 2019, 2021, and Microsoft 365), we can leverage dynamic arrays and the powerful TEXTJOIN function to accomplish this cleanly and elegantly.

Anatomy of the Formula

Let us look at the complete formula first, and then break down exactly how each component works. Assuming the text you want to analyze is located in cell A2, the formula to extract the vowels is:

=TEXTJOIN("", TRUE, IF(ISNUMBER(SEARCH(MID(A2, ROW(INDIRECT("1:"&LEN(A2))), 1), "aeiouAEIOU")), MID(A2, ROW(INDIRECT("1:"&LEN(A2))), 1), ""))

Note: If you are using Microsoft 365 or Excel 2021, you can use an even cleaner version using the SEQUENCE function, which we will discuss later in this article.

How the Formula Works: Step-by-Step

To understand why this formula works, we need to peel back its layers like an onion, starting from the inside and working our way out.

Step 1: Splitting the Text with MID and ROW/INDIRECT

The MID function is traditionally used to extract a substring from a text string starting at a specified position for a specified length. Its syntax is: MID(text, start_num, num_chars).

To split the entire string into individual characters, we need to feed the start_num argument an array of sequential numbers from 1 to the total length of the string. We calculate the length of the string using LEN(A2).

The construction ROW(INDIRECT("1:"&LEN(A2))) generates this sequence. If cell A2 contains the word "Excel" (which is 5 characters long), the formula resolves to:

  • LEN(A2) returns 5.
  • INDIRECT("1:5") references rows 1 through 5.
  • ROW(...) returns the array of numbers: {1; 2; 3; 4; 5}.

Plugging this back into our MID function:

MID("Excel", {1; 2; 3; 4; 5}, 1)

This outputs an array of individual characters: {"E"; "x"; "c"; "e"; "l"}.

Step 2: Checking for Vowels using SEARCH and ISNUMBER

Once we have our array of individual characters, we must verify which ones are vowels. This is achieved using the SEARCH function.

We check if our characters exist within the string of predefined vowels "aeiouAEIOU":

SEARCH({"E"; "x"; "c"; "e"; "l"}, "aeiouAEIOU")

Because SEARCH is case-insensitive, we don't strictly have to list both uppercase and lowercase, but doing so ensures bulletproof compatibility and clarity. If a character is found in the search string, SEARCH returns its starting numeric position. If it is not found, it returns a #VALUE! error. For "Excel", the output array is:

{1; #VALUE!; #VALUE!; 2; #VALUE!}

To convert this error-prone array into simple TRUE/FALSE states, we wrap it in the ISNUMBER function. This yields:

{TRUE; FALSE; FALSE; TRUE; FALSE}

Step 3: Filtering the Characters with IF

Now, we use the logical IF function to act on our array of TRUE/FALSE values. If the character is a vowel (TRUE), we keep it; if not (FALSE), we replace it with an empty string ("").

IF({TRUE; FALSE; FALSE; TRUE; FALSE}, {"E"; "x"; "c"; "e"; "l"}, "")

This conditional logic filters our original character array down to only the vowels, returning:

{"E"; ""; ""; "e"; ""}

Step 4: Merging the Vowels with TEXTJOIN

Finally, we need to stitch this array back together. The TEXTJOIN function is perfect for this task because it allows us to specify a delimiter, choose whether to ignore empty cells, and pass an array of strings to concatenate.

The syntax for TEXTJOIN is: TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...).

In our formula:

  • Delimiter: We use an empty string "" because we want the vowels joined side-by-side with no spaces or characters in between.
  • Ignore_Empty: We set this to TRUE so that Excel ignores the blank spaces ("") left behind by our discarded consonants.
  • Text: We pass our filtered vowel array: {"E"; ""; ""; "e"; ""}.

The final output is the clean string: "Ee".

The Modern Microsoft 365 Approach (Using SEQUENCE)

If you are using Microsoft 365 or Excel 2021, you have access to newer dynamic array functions that eliminate the need for the clunky ROW(INDIRECT(...)) construction. Instead, you can use the SEQUENCE function to generate your array of numbers seamlessly.

Here is the modern version of the formula:

=TEXTJOIN("", TRUE, IF(ISNUMBER(SEARCH(MID(A2, SEQUENCE(LEN(A2)), 1), "aeiou")), MID(A2, SEQUENCE(LEN(A2)), 1), ""))

This formula functions identically to the classic version but is much easier to read, write, and troubleshoot because SEQUENCE(LEN(A2)) directly builds our sequence array without relying on volatile row references.

Alternative: The FILTER Function Method

For Microsoft 365 users who love using the cleanest formulas possible, Excel's native FILTER function offers an even more elegant syntax that avoids the IF statement entirely.

=LET(chars, MID(A2, SEQUENCE(LEN(A2)), 1), TEXTJOIN("", TRUE, FILTER(chars, ISNUMBER(SEARCH(chars, "aeiou")))))

Using the LET function allows us to define the variable chars as our array of split characters. We then use FILTER to only include characters that exist within our vowel string before joining them back together with TEXTJOIN. This is highly performant and incredibly easy to audit.

Handling Edge Cases and Errors

When working with formulas of this nature in large production worksheets, you may run into a few edge cases. Here is how to handle them:

  • Empty Cells: If cell A2 is blank, LEN(A2) will return 0. This can cause SEQUENCE or INDIRECT to return an error. To prevent this, wrap your formula in an IFERROR function or check for blank cells first:
    =IF(A2="", "", TEXTJOIN(...)).
  • Including "Y" as a Vowel: In some linguistic analyses, the letter "Y" is treated as a vowel. If you need to include "Y", simply update your search string from "aeiou" to "aeiouy".
  • No Vowels Found: If the target string contains no vowels (such as the abbreviation "RHYTHM" if Y is excluded), the formula will return an empty string. If you want it to return a custom placeholder like "No Vowels", you can wrap the formula in an IF statement or verify if the output is blank.

Conclusion

Extracting vowels from text strings in Excel highlights just how versatile modern spreadsheet formulas can be. By transitioning from traditional cell-by-cell manipulation to robust array operations using TEXTJOIN, MID, and SEQUENCE, you can accomplish in a single cell what used to require lengthy VBA scripts or dozens of helper columns. Mastery of these nested array functions will greatly expand your capabilities when handling text mining, data cleansing, and advanced pattern matching inside Excel.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.