Extract All Numbers from Text and SUM It in Google Sheets

There’s a secret trick to extracting and summing all numbers from text in Google Sheets. Are you tired of manually going through lengthy texts and picking out the numbers? Well, worry no more! In this article, I will reveal not one, but two methods that will make this task a breeze. Let’s dive in and discover how you can effortlessly extract all numbers from text and sum them up in Google Sheets.

Different Formulas to Extract All Numbers from Text in Google Sheets

But first, let me introduce you to the formulas we’ll be using to extract those elusive numbers. Google Sheets has some fantastic text functions that will come to our rescue. This means that even though we’re dealing with numbers, we can still achieve our goal with these powerful formulas.

Now, let’s take a closer look at the two formulas we’ll be using and how you can make them work for you. These formulas have the amazing ability to extract all sets of numbers from a text string, no matter where they’re located.

Formula #1

In this first formula, we’ll be using a combination of the Split and Concatenate functions in Google Sheets. Let’s say we have a text containing numbers in cell A1. To extract all the numbers from this text, follow this formula:

=SPLIT(A1,CONCATENATE(SPLIT(A1,".0123456789")))

Formula #2

The second formula utilizes the Regexreplace and Split combination. Here’s how you can extract all numbers from text using this formula:

=SPLIT(REGEXREPLACE(A1, "[^d.]+", "|"), "|")

Both of these formulas extract numbers from text using different approaches. But don’t worry, you don’t have to understand the technicalities behind them. Simply copy and paste the formula that suits your needs, and let Google Sheets do the magic for you.

How to Extract and SUM all Numbers

Now that we can successfully extract all numbers from text, let’s take it one step further and learn how to sum these numbers in Google Sheets. It’s easier than you might think!

To sum up the extracted numbers, just place a SUM function in front of the formula we used earlier. Here’s how it looks:

Formula #1

=SUM(SPLIT(A1,CONCATENATE(SPLIT(A1,".0123456789"))))

Formula #2

=SUM(SPLIT(REGEXREPLACE(A1, "[^d.]+", "|"), "|"))

By incorporating the SUM function, you’ll get the total sum of all the numbers extracted from your text string. Isn’t that neat?

Conclusion

Now that you know how to extract and sum all numbers from text in Google Sheets, you can save yourself a ton of time and effort. These formulas are incredibly handy and can be a lifesaver when dealing with large amounts of text containing numbers.

So go ahead, try out these formulas and see how they revolutionize your data processing in Google Sheets. Remember to bookmark this article as a reference for future use!

Stay tuned for more exciting tips and tricks on how to make the most out of Google Sheets.


Related:

  1. How to Use Regexextract Function in Google Sheets and RE2 Regular Expressions
  2. How to Use REGEXMATCH Function in Google Sheets

Related posts