Extract Vowels and Consonants Separately in Google Sheets

In Google Doc Spreadsheets you can use the REGEX functions to play around with text strings. To extract vowels or consonants, you can use the REGEXREPLACE function, not the REGEXEXTRACT.

The REGEX is not the only function in Sheets that we can use for this purpose. You can also use the SUBSTITUTE function to extract vowels/consonants. But I find that formula a little lengthy. So I am not using the SUBSTITUTE formula here in my examples.

The Logic:

To return vowels from a text string, what you want to do is to replace all the consonants with"".

Similarly, to return consonants, replace all the vowels with"". See how to do that in the below formula examples.

Google Sheets Formulas to Extract Vowels and Consonants

Extracting Vowels from a Text String in Google Sheets

Assume cell A1 contains the text “info inspired”, the formula would extract the vowel letters “ioiie”. But do note that I have case sensitive and case insensitive formulas for this.

Case Sensitive Formula to Extract Vowels

Lowercase Vowels:

=REGEXREPLACE(A1,"[^aeiou]", "")

Uppercase Vowels:

=REGEXREPLACE(A1,"[^AEIOU]", "")

The above formulas are case sensitive. That means it will treat lowercase and uppercase letters differently.

Then how to make the REGEXREPLACE formula a case insensitive one?

Case Insensitive Formula to Extract Vowels

Lower/Upper/Proper Case Vowels:

=REGEXREPLACE(A1,"(?i)[^aeiou]", "")
Case Insensitive Formula to Extract Vowels in Google Sheets

Extracting Consonants from a Text String in Google Sheets

The formula to extract consonants is almost the same as the formula for extracting vowels. You just need to remove the caret sign ^ (negate) in the formula.

Case Sensitive Formula to Extract Consonants

Here also I have two separate formulas for lower and uppercase letters.

Lowercase Consonants:

=REGEXREPLACE(A1,"[aeiou]", "")

Uppercase Consonants:

=REGEXREPLACE(A1,"[AEIOU]", "")

Case Insensitive Formula to Extract Consonants

Lower/Upper/Proper Case Consonants:

This is the recommended formula for removing vowels from a string and subsequently extract the consonants.

=REGEXREPLACE(A1,"(?i)[aeiou]", "")

Make a Regex Formula Case Insensitive Using The Lower Function

You can use the functions LOWER/UPPER to make a REGEX formula case insensitive. As an example, I am extracting vowels using this method.

=REGEXREPLACE(LOWER(A1),"[^aeiou]", "")

Just wrap the cell reference with the LOWER function. Now see the formula that extracts consonants. It’s also similar in use.

=REGEXREPLACE(LOWER(A1),"[aeiou]", "")

You can go to my Google Sheets function guide to pick the REGEX functions to learn.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

How to Create a Searchable Table in Excel Using the FILTER Function

Finding specific records, or rows containing the required information, is straightforward in Excel using...

Time Sequences in Excel by Minute, Hour, or Second Increments

Creating time sequences, whether by hour, minute, or second increments in Excel, can be...

Finding Most Frequent Text in Excel with Dynamic Array Formulas

Looking to identify the most frequently occurring text in Excel? You can do this...

Hierarchical Numbering Sequences in Excel

Creating hierarchical numbering sequences in an Excel spreadsheet can significantly improve the way you...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

4 COMMENTS

    • Hi, Julia,

      The following formula will highlight the cell A2 if the first two letters in this cell are consonants.

      =len(regexreplace(left(A2,2),"[aeiou]",))=2

      The same formula can be used for the range A2:A too. There are no changes in the formula.

      Best,

  1. Hi, thanks for this.

    Any way to do it without space.

    E.g. Green Mango > GrnMng

    How about if I would like to get the Initials.

    E.g. Green Mango > GM

    Thanks!

    • The below formula would return the required consonants without space.

      =REGEXREPLACE(A1,"(?i)[aeiou ]", "")

      To extract the initials, that means the first letter in each word, use the following formula.

      =regexreplace(proper(A1), "[^A-Z]", "")

      Best,

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.