The Google Sheets REDUCE function is your powerful tool for combining multiple values into a single result, eliminating the need for messy loops or nested functions like AGGREGATE or QUERY. It’s especially useful when you must merge arrays in complex ways—whether summing numbers, concatenating text, or applying custom logic—without writing repetitive code. You’ll need a spreadsheet with at least one column of values (numbers, text, or arrays) to test REDUCE, along with a basic understanding of array syntax in Sheets (e.g., {1,2,3} for a list). Unlike older methods like FLATTEN + SUM, REDUCE handles errors gracefully and scales to datasets of any size.
What You'll Need
- A Google Sheet (or Google Sheets app) with at least one column of data.
- Basic knowledge of how to reference cells or ranges (e.g.,
A1:A10). - Internet access to run the formula (no local installation needed).
- A helper column to store intermediate results if debugging.
Step-by-Step
- Prepare your data
Start with a column (e.g.,
B2:B10) containing values that need merging. REDUCE works best with a fixed-size array (e.g.,{1,2,3}), so if your data is dynamic (e.g.,=ARRAYFORMULA(B2:B10)), copy it into a new cell or range. For example:A2:A10 = {"apple", "banana", "cherry", "date", "elderberry"} - Choose a starting value
REDUCE requires an initial "seed" value that matches the output type of your operation. For text concatenation, use an empty string
"". For numbers, use 0 (numeric) or 0.1 (if summing decimals). Example for concatenation:REDUCE("", B2:B10, CONCAT) - Define the operation
Replace
CONCATwith the function you need. Common options:SUM:REDUCE(0, B2:B10, SUM)(sums numbers like1+2+3=6).CONCAT:REDUCE("", B2:B10, CONCAT)(joins text with"applebananacherry").MAXorMIN:REDUCE(0, B2:B10, MAX)(finds the highest value).- Custom functions: Replace
CONCATwith your own logic (seeIFexamples below).
- Test with a small array
Reduce your range to just 2–3 values to verify the formula works. For example:
REDUCE("", {"apple","banana"}, CONCAT) = "applebanana"If it returns a blank or error, check for typos in the operation or range. - Apply to full data range
Paste your formula into an empty cell (e.g.,
C2) with the full range:REDUCE("", B2:B10, CONCAT)Google Sheets will automatically expand the array reference to include all rows. - Debugging helpers
To isolate issues:
- Use a helper column to log intermediate results. For example, add:
REDUCE("", B2:B2, CONCAT) = "apple"to show how the first step works. - Check for errors with
=IFERROR(REDUCE(...), "Error"). - Test in a new sheet to rule out conflicts with other formulas.
- Use a helper column to log intermediate results. For example, add:
Common Mistakes
- Forgetting to include the seed value
REDUCE fails silently if the seed doesn’t match the output type. For example, passing
SUM(5, B2:B10)will throw an error. Always use0for numbers or""for text. - Using mixed array types
REDUCE requires all elements in the range to be of the same type (e.g., all numbers or all text). A mix (like
{1, "two"}) will cause an error. Clean your data first if needed. - Ignoring array size mismatch
If your seed and range size differ (e.g.,
REDUCE("hello", {"a", "b"}, CONCAT)), REDUCE may behave unexpectedly. Always test with equal-sized arrays. - Assuming REDUCE works everywhere REDUCE is only available in Google Sheets (not Excel or older versions). Check your browser’s status bar for errors if it doesn’t work.
Tips
- Replace
CONCATwith custom logic Use functions likeIFto handle conditional merging. Example:REDUCE("", B2:B10, IF(B2:B10="stop", "STOPPED", CONCAT))will concatenate all values except "stop." - Combine with
ARRAYFORMULAFor dynamic ranges, wrap REDUCE inARRAYFORMULA:=ARRAYFORMULA(REDUCE("", B2:B100, CONCAT))to apply it to a scrollable range. - Use REDUCE for nested arrays For multi-dimensional arrays (e.g., ), REDUCE with JOIN : REDUCE("", {"a","b"}, JOIN("")) gives "ab".
- Avoid errors with
AGGREGATEwhen needed REDUCE is simpler for basic operations, butAGGREGATE(14,7,...) is safer for complex cases (e.g., excluding errors).
Troubleshooting
If REDUCE doesn’t work as expected, start with these checks:
- Verify the formula syntax
REDUCE(seed, array, operation)must match exactly. Check for typos in the operation (e.g.,SUMvsSUB). - Test in a new sheet Create a blank sheet and paste your formula. If it works there, the issue is likely a data conflict elsewhere in your original sheet.
- Check for array type errors
Use
=IFERROR(REDUCE(...), "Array type mismatch")to debug. REDUCE will return a blank cell for mismatches instead of an error. - Update Google Sheets
REDUCE requires Sheets version 2020 or later. Go to
Help > About Google Sheetsto check your version. - Try the
ARRAY_AGGworkaround If REDUCE still fails, replace it with:=JOIN("", ARRAY_AGG(B2:B10))(for text) or=SUM(ARRAY_AGG(B2:B10))(for numbers).
Frequently Asked Questions
How do I use REDUCE to sum numbers in a column?
Use this formula: REDUCE(0, B2:B10, SUM). The initial seed is 0, and REDUCE adds each number sequentially. Works even if the column contains zeros or empty cells (they’re ignored).
Can I use REDUCE with dates?
Yes, but you must adjust the seed and operation. For the first date, use MIN(B2:B10) as seed and MAX as operation. Example:
REDUCE(MIN(B2:B10), B2:B10, MAX)
What happens if my array is empty?
REDUCE will return the seed value if the array is empty. For text, this becomes an empty string (""); for numbers, it’s 0. To handle this explicitly, use a helper column with IF(COUNT(B2:B10)=0, "Empty", REDUCE(...)).
How do I combine REDUCE with sorting?
REDUCE works on raw arrays, so you must sort first. Use SORT before REDUCE:
REDUCE("", SORT(B2:B10), CONCAT)
Is REDUCE faster than LOOKUP or QUERY?
For simple operations like concatenation or summation, REDUCE is often faster because it avoids intermediate steps. However, QUERY remains better for complex filtering. Test performance with =SPLIT(REDUCE(...), "") to see the output size.
Can REDUCE handle arrays with mixed data types (e.g., numbers and text)?
No. REDUCE requires all array elements to be of the same type. Clean your data with =FILTER(B2:B10, ISNUMBER(B2:B10)) or =FILTER(B2:B10, ISTEXT(B2:B10)) before applying REDUCE.