Replace #DIV/0! with 0 or a blank
=IFERROR(B2/C2,0)Excel · result on the sample sheet: 5 rows (D2:D6)
Describe what you need and get a working IFERROR formula for Excel and Google Sheets, tested on real data before you copy it. IFERROR returns a value you choose when a formula results in an error, and the formula's normal result otherwise.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=IFERROR(B2/C2,0)Excel · result on the sample sheet: 5 rows (D2:D6)
=IF(B2=0,"New",(C2-B2)/B2)Excel · result on the sample sheet: 5 rows (D2:D6)
=IFERROR(REGEXEXTRACT(A2,$E$1&" (.+?) "&$G$1),"")Google Sheets · result on the sample sheet: 5 rows (B2:B6)
=SUM(B2:D2)Excel · result on the sample sheet: 5 rows (E2:E6)
=SUMPRODUCT(B2:B7,C2:C7)Excel · result on the sample sheet: $170.90
=DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}"))Google Sheets · result on the sample sheet: 5 rows (B2:B6)
=IFERROR(REGEXEXTRACT(A2,"[\w.+-]+@[\w-]+\.[\w.-]*\w"),"")Google Sheets · result on the sample sheet: 5 rows (B2:B6)
=SUM(IFERROR(C2:C8,0))Excel · result on the sample sheet: $529.00
You describe the task in plain English, and it writes the formula, using IFERROR where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.
IFERROR returns a value you choose when a formula results in an error, and the formula's normal result otherwise.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the IFERROR function page has a practice exercise.