What you will build

Create the named function LINE_TOTAL(qty, unit_price, tax_rate) from a tested formula, then use it to calculate Total for all three sample rows and verify the results.

Learning objectives

Open the practice workbook

HANDS-ON PRACTICE

Practice in your own copy

Make your own Google Sheets copy with the same data, formulas, formatting, filter and frozen header. The original remains unchanged.

Make a Google Sheets copy (access required) ↗View original

Sign in to Google. If the original is not publicly shared, download the full workbook and import it into Google Sheets, or paste the example data into your own sheet.

Complete Google Sheets source table before formula verification.

Hands-on practice

Step 1: Select D2, enter =A2*B2*(1+C2), and confirm the result is 16.5. This is the base formula used to verify the logic before creating the named function.

=A2*B2*(1+C2)

Step 2: Open Data > Named functions. Select Add new function, set Function name to LINE_TOTAL, then add three Argument placeholders in this order: qty, unit_price, tax_rate.

Step 3: In Formula definition, enter =qty*unit_price*(1+tax_rate). Select Next, review the function name and three arguments, then select Create to save the named function.

Google Sheets Edit named function sidebar showing LINE_TOTAL, qty, unit_price, tax_rate, and the formula definition while the verified result table remains visible.

Step 4: Return to D2 and enter =LINE_TOTAL(A2,B2,C2). Confirm D2 is still 16.5, then copy/fill D2 down through D4 instead of retyping the formula in each cell.

=LINE_TOTAL(A2,B2,C2)
Cell D2 selected with =LINE_TOTAL(A2,B2,C2) visible in the formula bar, calculated result 16.5, filled results 44 and 13.2, and the LINE_TOTAL named function visible in the sidebar.

Checkpoint

QtyUnit priceTax rateTotal
350.116.5
2200.144
1120.113.2

For formula lessons, result cells must be calculated rather than typed manually.

Common mistakes and fixes

Do not use A2, B2, C2 directly in the named function Formula definition. The definition must use the placeholders qty, unit_price, tax_rate; cell references belong in the call =LINE_TOTAL(A2,B2,C2).

Independent practice

Change Qty in A2 from 3 to 4 and confirm D2 changes from 16.5 to 22; then restore A2 to 3 and confirm D2 returns to 16.5.

Key takeaways

  • ✓Verify the base formula before turning its logic into a named function.
  • ✓Create LINE_TOTAL from Data > Named functions with the arguments qty, unit_price, tax_rate.
  • ✓Use =qty*unit_price*(1+tax_rate) in Formula definition rather than direct cell references.
  • ✓Call =LINE_TOTAL(A2,B2,C2) in D2, then fill it down through D4.
  • ✓The verified results are 16.5, 44, and 13.2; changing A2 to 4 should change D2 to 22.
QUICK CHECK

Check your understanding

Answer four questions about the practice sheet.

1. Which base formula should you verify before creating LINE_TOTAL?
2. What is the correct Formula definition for LINE_TOTAL?
3. What is the correct LINE_TOTAL call in D2?
4. After entering the function in D2, what is the best way to apply it to D3:D4?

Next lesson

Continue in recommended learning order with Make a copy of a spreadsheet.