In this article, we will learn How to Sum Values in a Range Containing Redundant Spaces in Excel.

**Array formulas to get the sum of Numbers**

In Excel many times, we need to apply the mathematical operations like SUM, COUNT, AVERAGE, MIN or MAX applied over the range of values having criteria. Here the condition is that the cell contains spaces. The spaces with numbers makes it read as text. And text values are either ignored or counted as 0 with mathematical operators. Here we will remove all the spaces with formula and return the sum of values.

**Array sum formula with spaces in numbers in Excel**

Here for the purpose we use SUM, VALUE and SUBSTITUTE function for the range of values to sum. Array formula takes an array and returns the array to the subsequent function till a mathematical operation is performed.

**formula:**

{ =SUM(VALUE(SUBSTITUTE(range," ",""))) } |

{ } : curly braces shows this is an array formula.

range : list of numbers to sum.

SUM : sum function sums up all the values.

**Note** : Do Not use the curly braces manually. Just use the formula without braces and use **Ctrl + Shift + Enter** in place of using Enter.

**Example :**

All of these might be confusing to understand. Let's understand how to use the function using an example. Here The numbers in column C contain redundant spaces.

If we try to calculate a total using the SUM function, 229 is returned which is definitely not correct. So we use our formula and see what happens

**Use the formula:**

{=SUM(VALUE(SUBSTITUTE(A2:A4," ","")))} |

As you can see the formula returns 500 which is the correct result.

This is an array formula so careful while applying the formula.

Here are all the observational notes using the formula in Excel

**Notes :**

- The formula only works with only to look up the exact match.
- The SUMPRODUCT function considers non-numeric values as 0s.
- The SUMPRODUCT function considers logic value TRUE as 1 and False as 0.
- The argument array must be the same size else the function returns an error.
- SUMPRODUCT function returns the value corresponding to the TRUE values in the returned array after taking individual products in the corresponding array.
- Operators like equals to (
**=**), less than (**<**), less than equal to (**<=**), greater than (**>**), greater than equal to (**>=**) or not equals to (**<>**) can be performed within a formula applied, with numbers only.

Hope this article about How to Sum Values in a Range Containing Redundant Spaces in Excel is explanatory. Find more articles on summing number and related Excel formulas here.

If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at info@exceltip.com.

**Related Articles :**

**How to Use TRIM function in Excel****: **The TRIM function is used to trim strings and clean any trailing or leading spaces from string. This helps us in the cleaning process of data a lot.

**How to use the CLEAN function in Excel**: Clean function is used to clean up unprintable characters from the string. This function is mostly used with the TRIM function to clean up imported foreign data.

**Replace text from end of a string starting from variable position****: **To replace text from the end of the string, we use the REPLACE function. The REPLACE function uses the position of text in the string to replace.

**How to Check if a cell contains one of many texts in Excel****: **To find check if a string contains any of multiple text, we use this formula. We use the SUM function to sum up all the matches and then perform a logic to check if the string contains any of the multiple strings.

**Sum by OFFSET groups in Rows and Columns**** : **The OFFSET function can be used to sum group of cells dynamically. These groups can be anywhere in the sheet.

**SUM if date is between**** : **Returns the SUM of values between given dates or period in excel.

**Sum if date is greater than given date****: **Returns the SUM of values after the given date or period in excel.

**2 Ways to Sum by Month in Excel****: **Returns the SUM of values within a given specific month in excel.

**How to Sum Multiple Columns with Condition****: **Returns the SUM of values across multiple columns having condition in excel.

**Excel REPLACE vs SUBSTITUTE function****: **The REPLACE and SUBSTITUTE functions are the most misunderstood functions. To find and replace a given text we use the SUBSTITUTE function. Where REPLACE is used to replace a number of characters in string…

**Popular Articles :**

**How to use the IF Function in Excel** : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.

**How to use the VLOOKUP Function in Excel** : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.

**How to use the SUMIF Function in Excel** : This is another dashboard essential function. This helps you sum up values on specific conditions.

**How to use the COUNTIF Function in Excel** : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.