Cellwise

Unit 8 of 12

Clean results

Handle errors and round like a pro.

Functions in this unit: IFERROR, VLOOKUP, ROUND, ROUNDUP, AVERAGE, IF, SUMIF, XLOOKUP, AVERAGEIF, TEXT

Key ideas

Know your errors

#DIV/0! #N/A #NAME?

Each error tells you what went wrong. Read it before hiding it.

IFERROR gives a fallback

=IFERROR(B2/C2,0)

If the formula fails, show the fallback instead of an error.

ROUND changes the value

=ROUND(B2*C2,2)

Formatting only hides decimals. ROUND actually changes the number so totals match.

Lesson 1: Reading errors

  1. Match each error to its cause

    #DIV/0!
    Dividing by zero
    #N/A
    Lookup value not found
    #NAME?
    Misspelled function
    #VALUE!
    Wrong type of data
  2. What will C1 show?

    ABC
    1500

    C1 contains =A1/B1

    Show answer

    #DIV/0!. Excel cannot divide by zero.

  3. Price per unit is Revenue divided by Units. Some units are 0. Show 0 instead of an error. Start in D2, fill to D5.

    ABCD
    1ProductRevenueUnitsPer unit
    2Notebook420120
    3Lamp00
    4Pen425340
    5Easel00

    Hint: =IFERROR(B2/C2,0)

    Show answer

    =IFERROR(B2/C2,0) in D2. IFERROR catches the #DIV/0! on the zero rows.

  4. What does #NAME? usually mean?

    • A function or name is misspelled
    • A cell is empty
    • A number is too large
    • A lookup failed
    Show answer

    A function or name is misspelled. Check spelling first: =SUMM(A1:A3) gives #NAME?.

  5. Look up the price for F2, but show "Not found" instead of #N/A. Put it in G2.

    ABCDEFG
    1IDItemPriceStockFind IDPrice
    2P-101Desk lamp34.9912P-999
    3P-102Monitor arm894
    4P-103USB hub24.530
    5P-104Webcam59.950
    6P-105Keyboard7418
    7P-106Mouse pad12.7552

    Hint: Wrap the VLOOKUP inside IFERROR.

    Show answer

    =IFERROR(VLOOKUP(F2,A2:D7,3,FALSE),"Not found") in G2. A friendly message beats a scary error for the people reading your sheet.

Lesson 2: Rounding

  1. Calculate revenue rounded to 2 decimals in E2. Fill to E7.

    ABCDE
    1ProductUnitsPriceDiscountRevenue
    2Notebook123.3330.1
    3Pen71.2550.1
    4Stapler312.4990.1
    5Binder96.7450.1
    6Marker52.40490.1
    7Folder111.9010.1

    Hint: Revenue after discount is B2*C2*(1-D2). Wrap it: =ROUND( ... ,2)

    Show answer

    =ROUND(B2*C2*(1-D2),2) in E2. Rounding inside the formula keeps your totals matching the receipts.

  2. What will A1 show?

    A
    1

    A1 contains =ROUND(3.456,1)

    Show answer

    3.5. The digit after the cut is 5, so it rounds up.

  3. What will A1 show?

    A
    1

    A1 contains =ROUNDUP(2.1,0)

    Show answer

    3. ROUNDUP always goes away from zero.

  4. What is the difference between formatting to 2 decimals and ROUND(x,2)?

    • Formatting only changes what you see, ROUND changes the value
    • They are the same
    • ROUND only changes what you see
    • Formatting is more accurate
    Show answer

    Formatting only changes what you see, ROUND changes the value. Hidden decimals still add up, which is why totals sometimes look off by a cent.

  5. Average Test 1 scores rounded to a whole number. Put it in B8.

    ABCD
    1StudentTest 1Test 2Test 3
    2Maya928895
    3Leo677470
    4Priya859178
    5Sam586271
    6Nora798388
    7Eli969099
    8Average

    Hint: =ROUND(AVERAGE(B2:B7),0)

    Show answer

    =ROUND(AVERAGE(B2:B7),0) in B8. Zero decimals means a whole number.

Lesson 3: Final challenge

  1. Sales of $1,000 or more earn 5% commission, rounded to cents. Otherwise 0. Start in C2, fill to C6.

    ABC
    1RepSalesCommission
    2Ava1250.5
    3Ben980
    4Cara2033.33
    5Dev1000
    6Eva615.2

    Hint: =IF(B2>=1000, ROUND(B2*0.05,2), 0)

    Show answer

    =IF(B2>=1000,ROUND(B2*0.05,2),0) in C2. IF decides, ROUND cleans. Dev at exactly 1000 qualifies.

  2. Total revenue for the North region. Revenue is in column E. Put it in H2.

    ABCDEFGH
    1ProductRegionUnitsPriceRevenueNorth revenue
    2NotebookEast1203.5420
    3PenWest3401.25425
    4StaplerEast4512540
    5BinderNorth806.75540
    6MarkerWest2102.4504
    7FolderNorth1501.9285

    Hint: Check column B for "North", add column E.

    Show answer

    =SUMIF(B2:B7,"North",E2:E7) in H2. SUMIF works on formula results just like typed numbers.

  3. Look up the stock for the item named in F2. Show "Unknown" if it is missing. Put it in G2.

    ABCDEFG
    1IDItemPriceStockFind itemStock
    2P-101Desk lamp34.9912Webcam
    3P-102Monitor arm894
    4P-103USB hub24.530
    5P-104Webcam59.950
    6P-105Keyboard7418
    7P-106Mouse pad12.7552

    Hint: Search B, return D, with "Unknown" as the 4th argument.

    Show answer

    =XLOOKUP(F2,B2:B7,D2:D7,"Unknown") in G2. Stock is 0, which is a real answer, not an error.

  4. Build: average score of Ops, rounded to 1 decimal

    Show answer

    =ROUND(AVERAGEIF(B2:B7,"Ops",C2:C7),1). Inner function first, then wrap with ROUND.

  5. What will D1 show?

    ABCD
    1Pen41.25

    D1 contains =IF(B1*C1>=5,"Free shipping","Add "&TEXT(5-B1*C1,"$0.00"))

    Show answer

    Free shipping. 4 times 1.25 is exactly 5, which meets the >= test.