Exercises / Logic and decisions · 8 of 9
Hide #DIV/0! with IFERROR
IFERROR(value, fallback) returns the value, unless it is an error (#DIV/0!, #N/A, …), in which case it returns the fallback.
Your taskConversion rate is sales divided by visits. Some channels had no visits yet. In D2, divide C2 by B2, and use IFERROR to return 0 instead of an error. It will be copied down to D7.
Pro
Unlock this exercise and every module after the basics.
Pro opens every exercise in every module, your review schedule, and the final test for the course certificate.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Channel | Visits | Sales | Conversion |
| 2 | Search | 4200 | 126 | |
| 3 | 1850 | 74 | ||
| 4 | Social | 0 | 0 | |
| 5 | Referral | 960 | 41 | |
| 6 | Podcast | 0 | 0 | |
| 7 | Direct | 2300 | 58 |