Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Main Excel Formulas: Essential Functions You Need to Know

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel formulas are the engine behind data analysis, automation, and reporting in spreadsheets. The main formulas let you perform calculations, find values, combine text, and summarize data quickly. To use them, you only need a working Excel installation (Microsoft 365, Excel 2021, or newer) and basic familiarity with typing in cells.

What You'll Need

  • Microsoft Excel (any recent version: 365, 2021, 2019, or 2016)
  • A workbook with sample data (e.g., a list of sales, names, or numbers)
  • Basic understanding of cell references (e.g., A1, B2)

Step-by-Step

  1. Open Excel and prepare your data: Start a new blank workbook or open an existing one. Enter sample data in columns—for example, label Column A as "Product", Column B as "Price", and Column C as "Quantity". Type at least three rows of realistic values (e.g., A2="Apple", B2=1.50, C2=10).
  2. Use SUM for addition: In cell D1, type =SUM(B2:B4) and press Enter. This adds all values from B2 through B4. Replace B4 with your actual last row if needed. You can also click cell D1, then press Alt + = (Windows) or Command + Shift + T (Mac) to auto-sum a selected column.
  3. Calculate averages with AVERAGE: In cell E1, type =AVERAGE(C2:C4) and press Enter. This returns the mean of the quantity values. Use this to find typical values across datasets.
  4. Find the highest or lowest value: In cell F1, type =MAX(B2:B4) and press Enter to get the highest price. In G1, type =MIN(B2:B4) for the lowest. These help spot outliers or extremes quickly.
  5. Count entries with COUNT or COUNTA: In H1, type =COUNT(B2:B4) to count only numeric cells. In I1, type =COUNTA(A2:A4) to count all non-empty cells (including text like "Apple"). Use COUNTBLANK to find empty cells (e.g., =COUNTBLANK(A2:A4)).
  6. Combine text with CONCAT or &: In cell A6, type =CONCAT(A2," - $",B2) to produce "Apple - $1.50". Alternatively, use =A2 & " - $" & B2. Both join text and numbers into readable labels.
  7. Conditionally return values with IF: In D2, type =IF(C2>5,"In Stock","Low Stock") and drag down. This checks if quantity exceeds 5 and returns a status. Replace 5 with your threshold, and adjust column references as needed.
  8. Look up values with XLOOKUP (modern Excel) or VLOOKUP: First, create a lookup table elsewhere (e.g., K1=Product Code, L1=Category). In E2, type =XLOOKUP(A2,K2:K5,L2:L5,"Not Found") to match product names to categories. If XLOOKUP isn’t available (older Excel), use =VLOOKUP(A2,$K$2:$L$5,2,FALSE).
  9. Calculate totals with SUMIF or SUMIFS: In J1, type =SUMIF(A2:A4,"Apple",C2:C4) to sum quantities only for "Apple". For multiple criteria (e.g., product = "Apple" AND price > $1), use =SUMIFS(C2:C4,A2:A4,"Apple",B2:B4,">1").
  10. Get today’s date dynamically: In cell K1, type =TODAY(). This auto-updates each day—useful for expiration dates or report timestamps. Avoid hardcoding dates like 10/1/2024.

Common Mistakes

  • Missing equal sign: Typing SUM(B2:B4) without = treats it as text, not a formula. Always start with =.
  • Incorrect range references: Using =SUM(B2,C4) adds only two cells, not a range. Use colons (B2:C4) for ranges, commas for separate cells.
  • Text-formatted numbers: If SUM returns 0, check if numbers are stored as text (left-aligned in cells). Convert by selecting the range, clicking the exclamation mark that appears, and choosing "Convert to Number".
  • Unescaped quotes in text: In =CONCAT("He said, ""Hello"""), double the inner quotes. Single quotes won’t work here.
  • Hardcoding values instead of referencing cells: Typing =IF(C2>5,"In Stock","Low Stock") is better than =IF(10>5,...) because it updates when data changes.

Tips

  • Use F4 to lock references: After typing a cell reference (e.g., B2), press F4 to cycle through absolute ($B$2), mixed ($B2, B$2), and relative (B2) references. Critical for copying formulas across rows/columns.
  • Break complex formulas into helper columns: Instead of one long nested IF, use separate columns for each condition. This improves readability and debugging.
  • Press Ctrl + ` (backtick) to toggle formula view: See all formulas at once to spot errors before running calculations.
  • Use AutoComplete: Start typing a function (e.g., =SU)—Excel suggests SUM, SUBTOTAL, etc. Press Tab to accept.
  • Validate with Trace Precedents/Dependents: Go to Formulas > Trace Precedents to see which cells feed into a formula, or Trace Dependents to see what depends on it.

Troubleshooting

If your formula returns an error, follow these steps:

  1. Check for #NAME?: Usually means Excel doesn’t recognize the function name. Verify spelling (e.g., "SUM" not "SMU"), and ensure you’re using a function available in your Excel version (XLOOKUP requires Excel 365 or 2021+).
  2. Fix #REF!: Indicates a broken reference (e.g., deleted column). Rebuild the formula by re-selecting the range or typing new cell references manually.
  3. Resolve #VALUE!: Happens when a function expects a number but gets text (e.g., =SUM("A",2)). Ensure all inputs are numeric or use functions like VALUE() to convert text numbers.
  4. Handle #N/A in lookups: If XLOOKUP or VLOOKUP returns #N/A, confirm the lookup value exists in the table. Add an error handler: =IFERROR(XLOOKUP(...),"Not Found").
  5. Debug step-by-step: Select part of a formula in the formula bar and press F9 to evaluate it. Start with innermost functions and work outward to isolate where the value breaks.

Frequently Asked Questions

What’s the difference between SUM and SUMIF?

SUM adds all numbers in a range (e.g., =SUM(B2:B10)). SUMIF adds only values that meet a condition (e.g., =SUMIF(A2:A10,"Apple",B2:B10) sums B2:B10 where A2:A10 equals "Apple").

Can I use formulas in filtered rows?

Yes, but SUM will include hidden rows. Use SUBTOTAL instead: =SUBTOTAL(9,B2:B10) (9 = SUM) only sums visible rows after filtering.

Why does my formula show as text instead of calculating?

The cell is likely formatted as Text. Right-click the cell > Format Cells > choose Number or General, then re-enter the formula. Alternatively, press F2 and Enter to force recalculation.

How do I copy a formula without changing cell references?

Use absolute references (e.g., $B$2) or press F4 after selecting a reference to lock it. When dragging the fill handle, locked references won’t adjust.

Is there a limit to how many functions I can nest?

In modern Excel, you can nest up to 64 functions in one formula. However, deeply nested formulas become hard to maintain—prefer XLOOKUP with IFS or helper columns for readability.

Do formulas recalculate automatically?

By default, yes—but check Formulas > Calculation Options > Automatic. If set to Manual, press F9 to recalculate the sheet or Shift + F9 for the active sheet only.