Excel formulas are essential for automating calculations, analyzing data, and saving time. Mastering the most commonly used formulas lets you quickly sum numbers, find averages, look up values, count entries, and more—without manual effort. No special tools are required beyond a working installation of Microsoft Excel (desktop or web) and a basic understanding of cell references (e.g., A1, B2).
What You'll Need
- Microsoft Excel (any modern version: Excel 365, Excel 2021, Excel 2019, or Excel for the web)
- A spreadsheet with sample data (optional, but helpful for practice)
- Basic familiarity with entering data into rows and columns
Step-by-Step
- Open Excel and prepare your data. Ensure your data is organized in clear columns and rows, with headers in the first row (e.g., Column A: Product, Column B: Quantity, Column C: Price). Avoid blank rows or columns within your data range unless necessary. This structure makes formulas more reliable and easier to copy.
- Start every formula with an equals sign (=). Click a blank cell where you want the result to appear, type
=, and then begin typing the formula name (e.g.,SUM,AVERAGE). Excel’s auto-complete will suggest matching functions—press Tab to accept the top suggestion. - Use the SUM function to add numbers. To sum a range like B2 through B10, type
=SUM(B2:B10)and press Enter. You can also click and drag to select the range after typing=SUM(. For non-contiguous cells (e.g., B2, B5, B9), type=SUM(B2,B5,B9). - Calculate averages with AVERAGE. To find the mean of C2 to C20, type
=AVERAGE(C2:C20). This function ignores text and blank cells but includes zeros—be aware if your data has empty cells you want excluded entirely. - Count entries with COUNT and COUNTA. Use
=COUNT(A2:A100)to count only numeric values in the range, or=COUNTA(A2:A100)to count all non-empty cells (including text, errors, or logical values). This is vital for tracking how many records exist in a dataset. - Look up values with XLOOKUP (modern replacement for VLOOKUP). To find a product’s price in a table where Column A lists products and Column C lists prices, type
=XLOOKUP("Apple",A2:A50,C2:C50). Replace "Apple" with a cell reference (e.g., E2) for dynamic searches. The syntax isXLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). - Combine text with CONCAT or &. To join First Name (A2) and Last Name (B2) into "John Smith", use
=CONCAT(A2," ",B2)or=A2&" "&B2. The CONCAT function is cleaner and avoids nested ampersands; the & operator works in all Excel versions. - Apply conditional logic with IF. To label sales as "High" or "Low" based on a threshold (e.g., $100), type
=IF(C2>=100,"High","Low"). You can nest multiple IFs (e.g.,=IF(C2>=100,"High",IF(C2>=50,"Medium","Low"))) or use IFS for cleaner nested logic in newer Excel versions. - Find today’s date with TODAY. Type
=TODAY()to insert the current system date. This updates automatically each day and is useful for aging reports or expiration checks. Avoid typing dates manually—always use functions like TODAY or DATE to ensure accuracy. - Calculate date differences with DATEDIF. To compute the number of complete years between a start date in A2 and end date in B2, use
=DATEDIF(A2,B2,"y"). The third argument ("y", "m", or "d") specifies units. Note: DATEDIF is undocumented but widely supported; it only returns full units (e.g., ignores partial years).
Common Mistakes
- Missing or extra parentheses: A formula like
=SUM(A1:A10)*0.1is correct, but=SUM(A1:A10*0.1)changes the logic. Always match opening and closing parentheses. - Incorrect cell references after copying: When dragging a formula down a column, relative references (e.g., A1) shift (e.g., A2, A3). Use absolute references (e.g., $A$1) with dollar signs to lock a cell, or press F4 to toggle reference types.
- Text-formatted numbers: If SUM returns 0, your "numbers" might be stored as text. Check for green triangles in cell corners and use
=VALUE(A1)or the "Convert to Number" option in the Error Checking button. - Ignoring blank cells in COUNT functions: COUNT treats blanks as zeros in AVERAGE but ignores them in SUM. Use COUNTA for non-blanks or COUNTBLANK to identify gaps.
- Hardcoding values instead of using cell references: Typing
=A2*0.0825is better than=A2*0.0825if the tax rate changes—replace 0.0825 with a cell reference (e.g., E1) for flexibility.
Tips
- Use named ranges: Select a range (e.g., A2:A100), go to the Formulas tab > Define Name, and call it "SalesData". Then use
=SUM(SalesData)—it’s easier to read and maintain. - Press Ctrl+` to toggle formula view: This shows all formulas instead of results, helping debug errors quickly. Toggle back with Ctrl+` again.
- Apply AutoFill for consistency: Enter a formula in one cell, then drag the small square in the bottom-right corner of the cell down or across to copy it with adjusted references.
- Use F9 to evaluate parts of a formula: Select a portion of a formula in the formula bar and press F9 to see its intermediate result. Press Enter to keep the full formula or Esc to cancel.
- Leverage Excel’s Function Wizard: Click Formulas tab > Insert Function (or press Shift+F3), search for a function (e.g., "XLOOKUP"), and fill in arguments step-by-step.
- Combine functions for powerful results: Nest XLOOKUP inside IF:
=IF(XLOOKUP(E2,A:A,B:B)="","Not Found",XLOOKUP(E2,A:A,B:B))to handle missing values.
Troubleshooting
If your formula doesn’t work, follow these steps in order:
- Check for #NAME? error: This usually means Excel doesn’t recognize a function name. Verify spelling (e.g., "AVERAE" instead of "AVERAGE") and ensure you’re using a function supported in your Excel version (e.g., XLOOKUP requires Excel 365 or 2021).
- Inspect #REF! or #VALUE! errors: #REF! indicates a deleted cell reference; rebuild the formula. #VALUE! means incompatible data types (e.g., adding text to a number)—ensure all arguments match the function’s requirements.
- Verify cell formatting: If a formula returns unexpected results, right-click the cell > Format Cells, and confirm it’s set to "General" or the correct number format (e.g., Number, Date).
- Test with simpler inputs: Replace complex cell references with hard-coded values (e.g., change
=A2+B2to=10+20) to isolate the issue. If it works, the problem lies in the source data. - Check for hidden spaces or non-breaking characters: Use
=TRIM(A1)or=CLEAN(A1)to remove invisible characters that may cause mismatches in lookups. - Restart Excel or your computer: Rarely, memory issues cause formula calculation errors. Restarting clears Excel’s temporary state and often resolves glitches.
Frequently Asked Questions
What’s the difference between SUM and SUMIF?
SUM adds all numbers in a range, while SUMIF adds only numbers that meet a condition. Example: =SUMIF(A2:A10,">100",B2:B10) sums values in B2:B10 only where A2:A10 exceeds 100.
Can I use formulas in Excel for the web?
Yes—most core formulas (SUM, AVERAGE, XLOOKUP, IF, etc.) work identically in Excel for the web. Advanced functions like FILTER or SEQUENCE may be limited depending on your subscription tier.
How do I prevent formulas from updating automatically?
Go to File > Options > Formulas, and under Calculation options, select "Manual". Then press F9 to calculate only when you want. This speeds up large spreadsheets but requires manual recalculation.
Why does XLOOKUP return #N/A even when the value exists?
Common causes: (1) Extra spaces in lookup values (use TRIM), (2) Mismatched data types (e.g., text "123" vs. number 123), or (3) The lookup range isn’t sorted correctly if using approximate match. Always use exact match (match_mode=0) unless needed.
Is there a limit to how many formulas I can use?
Excel supports up to 15,000 characters per formula and thousands of formulas per sheet. Performance may slow with extremely large, complex workbooks—simplify or break into smaller sheets if needed.
How do I copy a formula without changing cell references?
Use absolute references (e.g., $A$1) or copy the formula text directly: select the formula bar, press Ctrl+C, then paste into another cell. Alternatively, drag the fill handle while holding Alt to copy without adjusting references.