Google Sheets vs Excel: where the formulas disagree
Most formulas work the same in both products; these don't. Each entry is a formula, what Excel returns, what Sheets returns, and what SheetSure writes instead. 19 of the 28 are silent: the same formula gives a different answer, and neither product shows an error.
The catalog
28 of 28 differences
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=2^3^2Excel · left to right64Sheets · right to left512Our rewrite=(2^3)^2Excel works out 2^3 first, then squares it. Sheets works out 3^2 first. The rewrite adds parentheses, so Sheets reads it Excel's way.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=0+""Excel#VALUE!Sheets0Our rewrite=0+LET(operand,"",IF(operand="",VALUE("x"),operand)) MeasuredOne workbook went from 862 mismatched cells to 0.""/21, 0+"" and --"" are #VALUE! in Excel and 0 in Sheets. Operands that can be "" (cells whose formula can return "", text functions, &, IF branches that return "") are wrapped so the Excel error is kept. Truly empty cells are 0 in both and stay untouched.
Given · A1 is empty.
SILENT DIFFERENCESame formula, different answer. No error is shown.=A1Excel0Sheets(blank)Our rewrite=IF(ISBLANK(A1),0,A1)Excel shows 0 for a reference to an empty cell; Sheets shows nothing. The rewrite returns 0 when the cell is empty. The same rule covers IF, IFERROR, IFS, SWITCH and CHOOSE branches.
Given · A1 is 0 or less, so the empty third argument is used.
SILENT DIFFERENCESame formula, different answer. No error is shown.=IF(A1>0,B1,)Excel0Sheets(blank)Our rewrite=IF(A1>0,IF(ISBLANK(B1),0,B1),0)Excel returns 0 for an IF branch left empty; Sheets returns nothing. The rewrite writes the 0 out, and guards B1 in case it's empty.
Given · A2 is empty.
SILENT DIFFERENCESame formula, different answer. No error is shown.=TRANSPOSE(A1:A4)Excel · in A2's place0Sheets(blank)Our rewrite=TRANSPOSE(ARRAYFORMULA(IF(ISBLANK(A1:A4),0,A1:A4)))Excel writes 0 where the source cell is empty; Sheets leaves it blank. The rewrite turns empty cells into 0 before transposing. A real "" stays "".
Given · A4 is empty.
SILENT DIFFERENCESame formula, different answer. No error is shown.=INDEX(A2:A9,3)Excel0Sheets(blank)Our rewrite=LET(result,INDEX(A2:A9,3),IF(ISBLANK(result),0,result))INDEX and VLOOKUP return 0 in Excel when they land on an empty cell; Sheets returns blank. The rewrite turns an empty result into 0. A real "" in the cell stays "".
Given · F1 is 0.62. The keys in column A were calculated (each one the previous plus 0.01), so the one meant to be 0.62 holds 0.6200000000000003.
SILENT DIFFERENCESame formula, different answer. No error is shown.=VLOOKUP(F1,A1:B62,2)Excel · compares exactlythe 0.61 rowSheets · treats them as equalthe 0.62 rowOur rewrite=LET(result,INDEX(A1:B62,MATCH(0,ARRAYFORMULA(A1:A62-(F1)),1),2),IF(ISBLANK(result),0,result)) MeasuredEnron's ECS LLC Nomination Model: 72 cells.Calculated numbers can carry tiny leftovers in their last decimals. Excel sees 0.62 as smaller than 0.6200000000000003, so the lookup stops one row early, at 0.61; Sheets treats the two as equal and returns the 0.62 row. The rewrite finds the same row as Excel.
- − EXCEL
=TEXTSPLIT("1,2",",")+ SHEETS=ARRAYFORMULA(SUBSTITUTE(SPLIT(UNICHAR(8203)&SUBSTITUTE("1,2",",",","&UNICHAR(8203)),",",FALSE,FALSE),UNICHAR(8203),""))Excel · text"1"Sheets · SPLIT returns a number1TEXTSPLIT isn't in Google's Sheets function list, and Sheets' SPLIT turns number-like pieces into numbers. The rewrite uses SPLIT with a zero-width-space marker (UNICHAR(8203)), so the pieces stay text, then removes the marker. Only the form with a column delimiter is rewritten.
- − EXCEL
=CONCAT(A1,B1,C1)+ SHEETS=TEXTJOIN("",FALSE,A1,B1,C1)Excelall three joinedSheets · CONCAT takes exactly twotwo values onlySheets' CONCAT takes exactly two values. The rewrite uses TEXTJOIN with an empty delimiter instead.
- − EXCEL
=TEXTBEFORE(A1,"-")+ SHEETS=LET(source,A1,delimiter,"-",position,FIND(delimiter,source),IF(ISERROR(position),NA(),LEFT(source,position-1)))Exceltext before "-"Sheets · not in Google's listno TEXTBEFOREThe two-argument form becomes LEFT and FIND; when the delimiter isn't there, the rewrite returns #N/A. Other arguments need a rewrite by hand.
- − EXCEL
=TEXTAFTER(A1,"-")+ SHEETS=LET(source,A1,delimiter,"-",position,FIND(delimiter,source),IF(ISERROR(position),NA(),MID(source,position+LEN(delimiter),LEN(source))))Exceltext after "-"Sheets · not in Google's listno TEXTAFTERThe two-argument form becomes MID and FIND; when the delimiter isn't there, the rewrite returns #N/A. Other arguments need a rewrite by hand.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=VALUE("")Excel#VALUE!Sheets0Our rewrite=VALUE(LET(operand,"",IF(operand="",VALUE("x"),operand)))VALUE("") is #VALUE! in Excel and 0 in Sheets; VALUE of an empty cell is 0 in both. When the argument can be "", the rewrite turns it into #VALUE! first. VALUE is marked "Converted, see note" either way: reading text as a number depends on the locale.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=TEXTJOIN("-",,WORKDAY(A1,1),WORKDAY(A1,2))Excel · e.g. 44572day numbersSheets · e.g. 1/11/2022formatted datesOur rewrite=TEXTJOIN("-",,N(WORKDAY(A1,1)),N(WORKDAY(A1,2)))Excel joins dates as day numbers; Sheets joins them as formatted dates. The rewrite wraps date-typed arguments in N(), so Sheets joins the numbers too.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=RIGHT(68.7555555556,8)Excel55555556Sheets68.75556Excel and Sheets turn the number into text with different precision before RIGHT takes its characters. Not fixed: the formula is written as it is, and verification lists the cell as a mismatch.
Our rewrite · none yet. The formula is written as it is.
Given · A date in A2:A9 carries a time of day, e.g. 45200.5.
SILENT DIFFERENCESame formula, different answer. No error is shown.=XIRR(B2:B9,A2:A9)Excel · dates cut to whole days45200Sheets · time of day kept45200.5Our rewrite=XIRR(B2:B9,ARRAYFORMULA(INT(A2:A9))) Measured8 Enron power-plant models, 67 cells, differed in the 5th to 8th significant digit.Excel's XIRR reads 45200.5 as 45200; Sheets keeps the half day, so the rate moves. The rewrite cuts the dates with INT first (XNPV cuts them in both). Even then the two agree to about 8 significant digits, because Excel stops iterating sooner, so verification compares XIRR results, and formulas that read them, to 1e-7.
- − EXCEL
=MONTH("March"&0)+ SHEETS=MONTH("March"&" 1")Excel · "March0" is a date3Sheets#VALUE!Excel reads "March0" as a date, so the month is 3. Sheets can't read it. The rewrite appends " 1" instead, which Sheets reads as a date.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=DAYS(44532,-1)Excel#NUM!Sheets · counts back past 1899a day countOur rewrite=LET(date1,44532,date2,-1,IF(OR(N(date1)<0,N(date2)<0),#NUM!,DAYS(date1,date2))) MeasuredSpreadsheetBench 49278: DAYS($C$2,D18-1) with D18 empty.A negative date is #NUM! in every Excel date function. Sheets' DAYS and DATEDIF count back past 1899 instead. The rewrite returns #NUM! when a date argument is negative; DATEDIF gets the same guard.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=MONTH(0)Excel1Sheets12Our rewrite=LET(serial,(0)+0,IF(serial<0,#NUM!,IF(serial<1,1,IF(serial<60,MONTH(serial+1),IF(serial<61,2,MONTH(serial))))))Excel counts a 29 February 1900 that never existed, so its first 60 days fall one day apart from Google Sheets' calendar: day 0 is in January in Excel and in December 1899 in Sheets. This mostly matters for small numbers or TRUE/FALSE passed to MONTH, DAY or YEAR. When the value is surely that small, the rewrite follows Excel's calendar. WEEKDAY already agrees.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=DATE(1900,1,1)Excel1Sheets2Our rewrite=LET(date,DATE(1900,1,1),IF(date<61,date-1,date))Before 1 March 1900, Excel's day numbers are one lower than Sheets'. When the year can be 1900, the rewrite subtracts 1, as Excel counts. Excel's fake 29 February 1900 isn't reproduced.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=WORKDAY(A1,"")Excel#VALUE!Sheets · reads "" as 0 daysa dateOur rewrite=WORKDAY(A1,LET(operand,"",IF(operand="",VALUE("x"),operand))) MeasuredSpreadsheetBench 50631: 32 cells.Excel won't read "" as a number of days; Sheets reads it as 0 and returns a date. The rewrite keeps Excel's error. The same goes for the months of EDATE and EOMONTH, and every argument of DATE and TIME. An empty cell is 0 in both and stays untouched.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=SORT(A2:B9,1,-1)Excel · -1 means descendingdescendingSheets · -1 is TRUEascendingOur rewrite=SORT(A2:B9,1,FALSE)Excel's sort order is 1 or -1. Sheets reads -1 as TRUE, which means ascending. The rewrite writes FALSE for -1 and TRUE for 1; Excel's by_col sorting goes through TRANSPOSE.
- − EXCEL
=SORTBY(A2:B9,B2:B9,-1)+ SHEETS=SORT(A2:B9,B2:B9,FALSE)Excelsorted by B, descendingSheets · not in Google's listno SORTBYSheets' SORT accepts a separate sort column, so SORTBY becomes SORT, with -1 written as FALSE.
- − EXCEL
=FILTER(A2:A9,B2:B9>0,"none")+ SHEETS=LET(filtered,FILTER(A2:A9,B2:B9>0),IF(ISNA(ROWS(filtered)),"none",filtered))Excel · when nothing matches"none"Sheets · mismatched range sizes#N/AExcel reads the third argument as the value to show when nothing matches. Sheets reads it as another condition, and the formula fails. The rewrite filters first, then shows "none" when nothing came back. #N/A values inside the result stay. Formulas that call Sheets-only functions were typed for Sheets and are left alone.
- − EXCEL
=SEQUENCE(5,,1)+ SHEETS=SEQUENCE(5,1,1)Excel · omitted columns = 11 to 5Sheets · empty columns = 0#NUM!Excel reads an omitted SEQUENCE argument as its default, 1. Sheets reads an empty argument as 0, and 0 columns is #NUM!. The rewrite writes the 1 out.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=COUNTIF(A2:A9,"<>0")Excelcounts empty cellsSheetsskips empty cellsOur rewrite=(COUNTIF(A2:A9,"<>0")+COUNTIF(A2:A9,"="))Excel counts empty cells for any "<>number" criterion; Sheets leaves them out. "" counts in both, and text criteria agree. The rewrite adds COUNTIF(r,"="), which matches only empty cells. Converting back to Excel adds an r,"<>" condition instead.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=SUM(COUNTIF(A2:A9,{">0","<0"}))Excelboth criteriaSheetsfirst criterion onlyOur rewrite=SUM(ARRAYFORMULA(COUNTIF(A2:A9,{">0","<0"}))) MeasuredSpreadsheetBench 6698.In Excel an array constant is an array anywhere. In Sheets it's an array only inside ARRAYFORMULA: elsewhere COUNTIF uses the first criterion only (and VLOOKUP(x,IF({1,0},b,a),2,0) is #REF!). The rewrite wraps that call in ARRAYFORMULA.
- SILENT DIFFERENCESame formula, different answer. No error is shown.
=SUM(SUMIFS(C2:C9,A2:A9,{"a","b"}))Excelone total per criterionSheets · even inside ARRAYFORMULAfirst criterion onlyOur rewrite=SUM(MAP({"a","b"},LAMBDA(criterion1,SUMIFS(C2:C9,A2:A9,criterion1))))SUMIFS, AVERAGEIF(S), MAXIFS and MINIFS give one result per criterion in Excel. Sheets gives only the first, even inside ARRAYFORMULA (COUNTIF, COUNTIFS and SUMIF do give one each). The rewrite runs the function once per criterion with MAP and LAMBDA.
- − EXCEL
=AGGREGATE(15,6,A2:A9,1)+ SHEETS=SMALL(FILTER(A2:A9,NOT(ISERROR(A2:A9))),1)Excelsmallest, errors skippedSheetsno AGGREGATEFunction 15 is SMALL, and option 6 skips errors. The rewrite filters the errors out, then takes SMALL. If every value is an error, FILTER gives #N/A where Excel gives #NUM! or 0, so the cell is marked "Converted, see note". Other options need the underlying function by hand.
How an entry gets here
A difference goes in the catalog once SheetSure handles it, or once it's measured and left as it is. Silent differences come from comparing results in real Excel and real Google Sheets on real workbooks: the cell differed, we found out why, and the rule was written from that.
Entries marked NOT FIXED YET are converted as they are. Verification still compares those cells, so they show up as “Differs” in your report instead of passing unnoticed.
How conversion and verification work: How it works. What the rules add up to on real workbooks: Evidence.