Excel vs Google Sheets Formulas: The Differences That Break Your Spreadsheet
· 3 min read
Short answer: the everyday functions — SUM, IF, VLOOKUP, XLOOKUP, SUMIFS, COUNTIFS, INDEX, MATCH, TEXT, date functions — are written the same way in Excel and Google Sheets. Problems start with array formulas, with a handful of functions that exist in only one of the two, and with files moved between the programs.
Here is what actually differs, and how to translate.
Array formulas
In Excel 2021 and Microsoft 365, a formula that returns several values fills the neighbouring cells on its own. This is called spilling:
=A2:A100*B2:B100
Google Sheets needs to be told to treat the ranges as arrays:
=ARRAYFORMULA(A2:A100*B2:B100)
Functions that are built to return arrays, such as FILTER, UNIQUE and SORT, do not need ARRAYFORMULA in Sheets. Ordinary functions and operators applied to whole ranges do.
Excel 2019 and older have neither behaviour. There, array formulas have to be confirmed with Ctrl+Shift+Enter.
Functions that exist in only one program
| Task | Excel | Google Sheets |
|---|---|---|
| Text before or after a delimiter | TEXTBEFORE, TEXTAFTER | SPLIT, or LEFT with FIND |
| Split text into columns | TEXTSPLIT | SPLIT |
| Count distinct values | COUNTA(UNIQUE(...)) | COUNTUNIQUE |
| Weighted average | SUMPRODUCT(...)/SUM(...) | AVERAGE.WEIGHTED |
| SQL-style query on a range | No direct equivalent | QUERY |
| Pull data from another file | A link to the other workbook | IMPORTRANGE |
The formulas in the Excel column for counting and weighted averages also work in Google Sheets, so they are the safer choice for a file that has to open in both.
Open-ended ranges
Google Sheets lets you leave the end row off a range:
=SUM(A2:A)
That means "from A2 to the bottom of the column", and it keeps working as rows are added. Excel does not accept this syntax. Use a whole column, A:A, a generously sized range such as A2:A10000, or an Excel table, whose references grow with the data.
The same problem, different error codes
- A result cannot expand because cells are in the way. Excel shows #SPILL!. Google Sheets shows #REF! with a note that the array result was not expanded.
- FILTER finds no rows. Excel returns #CALC!. Google Sheets returns #N/A. In both, the third argument of FILTER sets a fallback value.
If you use IFERROR or IFNA to handle these, check that the function you chose catches the error your program actually produces.
Case sensitivity in UNIQUE
In Excel, UNIQUE treats apple and Apple as the same value. In Google Sheets, UNIQUE treats them as different. A count of unique values can therefore give a different number in each program on the same data. Normalise the text with LOWER first if you need the two to agree.
Moving a file between the two
When you upload an Excel file to Google Sheets, or download a Sheets file as .xlsx, formulas are converted where an equivalent exists. Functions without one — QUERY and IMPORTRANGE going to Excel, for instance — arrive as their last calculated values or as errors. After converting a file, search the sheet for error cells before trusting any total.
A rule for shared files
If a spreadsheet will be opened in both programs, stay with functions both support: XLOOKUP or INDEX MATCH, SUMIFS, COUNTIFS, FILTER, UNIQUE, SORT, TEXTJOIN, LET. Avoid ARRAYFORMULA-only constructions and the Excel-only text functions, or keep a note of which cells need a different formula in each program.