The most useful Excel formulas are a small set that covers the majority of everyday spreadsheet work: SUM and AVERAGE for totals, IF for decisions, SUMIFS and COUNTIFS for conditional totals and counts, XLOOKUP or VLOOKUP for matching data across tables, TEXTJOIN and CONCAT for combining text, and TRIM and PROPER for cleaning imported data. You do not need dozens of formulas; mastering these eight or nine will handle budgets, reports, lists and lookups faster and with fewer errors than clicking through menus. Everything below uses formulas that are built into current Excel for Microsoft 365, Excel 2021 and later, and Excel for the web; a few older versions lack XLOOKUP, and the guide notes where to substitute VLOOKUP.
What You'll Need
- Excel for Microsoft 365, Excel 2021 or later, or Excel for the web. Excel 2019 and earlier work for everything except XLOOKUP and TEXTJOIN (use VLOOKUP and the ampersand operator instead).
- A workbook with at least one table of data, or use the sample layout described in the steps.
- Basic familiarity with cell references such as A2 and ranges such as A2:A10.
- Optional: your data formatted as an Excel Table (select the range, then Insert > Table) so formulas expand automatically as rows are added.
Menu labels can differ slightly by Excel version, platform and region, so if a button name does not match exactly, look for the closest equivalent on the same tab.
Step-by-Step
- Set up a small practice table. In cells A1:C6, enter headers Item, Category and Amount, then five rows of sample data. This gives every formula below something real to calculate. Keep the header row in row 1 so formulas can reference whole columns safely.
- Total a column with SUM. Click an empty cell below the Amount column and type
=SUM(C2:C6), then press Enter. SUM ignores text and blank cells, so it is safer than adding cells one by one. For a quick check without a formula, select the range and read the status bar at the bottom of the window. - Average the same range with AVERAGE. Type
=AVERAGE(C2:C6). AVERAGE divides by the count of numeric cells only, so blanks do not drag the result down. If you need to ignore zeros as well, use=AVERAGEIF(C2:C6,"<>0"). - Make a decision with IF. In D2, type
=IF(C2>=100,"High","Low")and fill down to D6 by dragging the small square at the bottom-right corner of the cell. IF returns one value when the test is true and another when it is false. Text results must be in double quotes; numbers must not be. - Add conditional totals with SUMIFS. To total only the rows in one category, type
=SUMIFS(C2:C6,B2:B6,"Office"). The sum range comes first, then pairs of criteria range and criteria. You can add more pairs for extra conditions, for example a second pair restricting the amount. SUMIFS is the modern replacement for SUMIF and handles multiple conditions in one formula. - Count matching rows with COUNTIFS. Type
=COUNTIFS(B2:B6,"Office",C2:C6,">=50")to count Office rows of at least 50. The pattern is identical to SUMIFS: range, criterion, range, criterion. Use COUNTA to count non-empty cells and COUNT to count numbers only. - Look up a value with XLOOKUP. Put a category name in F2, then in G2 type
=XLOOKUP(F2,B2:B6,C2:C6,"Not found"). XLOOKUP searches the first range for the value and returns the matching item from the second range; the fourth argument supplies a friendly message when nothing matches. It searches in any direction and does not break when columns are inserted, which is why it replaces VLOOKUP in current Excel. - Use VLOOKUP only if XLOOKUP is unavailable. The equivalent is
=VLOOKUP(F2,B2:C6,2,FALSE). The lookup column must be the leftmost column of the range, the column number counts from that range, and FALSE forces an exact match. Always include FALSE; omitting it allows approximate matches and produces wrong results. - Join text with TEXTJOIN or the ampersand. Type
=TEXTJOIN(" ",TRUE,A2,B2)to combine item and category with a space, skipping blanks. For two cells only,=A2&" - "&B2is simpler and works in every version. - Clean imported text with TRIM and PROPER. If names arrive with stray spaces or odd capitals, wrap them:
=PROPER(TRIM(A2)). TRIM removes leading, trailing and repeated internal spaces; PROPER capitalises the first letter of each word. Nest them so the trim happens before capitalisation. - Lock references before copying. When a formula will be filled across or down, press F4 to cycle a reference to absolute ($A$1), mixed ($A1 or A$1) or relative. For example, a tax rate in E1 should be referenced as $E$1 so every copied row still points to it.
- Check for errors and wrap them. Select the formula cell and use Formulas > Evaluate Formula to step through the calculation. To hide expected errors such as #N/A from lookups, wrap the formula in IFERROR:
=IFERROR(XLOOKUP(F2,B2:B6,C2:C6),"Not found"). Do not wrap everything by default; it can hide real mistakes.
Common Mistakes
- Leaving the fourth argument off VLOOKUP, which silently returns approximate matches.
- Typing numbers inside quotes in IF or SUMIFS criteria, which turns them into text and stops them matching.
- Using relative references for a fixed rate or threshold, so copied formulas drift to the wrong cell.
- Mismatched range sizes in SUMIFS or COUNTIFS, which returns #VALUE!.
- Hard-coding values inside formulas instead of referencing cells, which makes updates slow and error-prone.
- Formatting a cell as text before entering a formula, so Excel shows the formula as plain text.
Tips
- Start every formula with = and use the formula bar's coloured brackets to check that each opening bracket has a closing one.
- Name key ranges (Formulas > Define Name) so formulas read as
=SUM(Amounts)instead of a cryptic range. - Convert data to an Excel Table so ranges grow automatically and structured references stay readable.
- Use Alt+= to insert an AutoSum formula instantly above or beside a column of numbers.
- Keep one formula per column and fill it down rather than editing individual cells; consistency makes errors obvious.
- Press Ctrl+` (the key left of 1) to toggle showing all formulas on the sheet, which helps audit a workbook.
Troubleshooting
- #NAME? error: the function name is misspelled or the version does not support it. Check spelling and confirm whether XLOOKUP or TEXTJOIN is available; if not, switch to VLOOKUP or the ampersand.
- #VALUE! error: a range size mismatch or text where a number is expected. Compare the ranges in SUMIFS and COUNTIFS and remove quotes from numeric criteria.
- #N/A from a lookup: the lookup value does not exist in the search range, or there are hidden spaces. Wrap the source in TRIM and confirm the value exists with Ctrl+F.
- Formula shows as text: the cell is formatted as Text. Change the format to General, then re-enter the formula by pressing F2 and Enter.
- Results do not update: calculation may be set to Manual. Go to Formulas > Calculation Options and choose Automatic.
- Copied formula points at the wrong cell: fix the reference with F4 and recopy.
Frequently Asked Questions
Do I need XLOOKUP or is VLOOKUP enough?
VLOOKUP works in every version and is fine for simple left-to-right lookups. XLOOKUP is more flexible, searches both directions and handles missing values cleanly, so use it when your version supports it.
What is the difference between SUMIF and SUMIFS?
SUMIF takes one condition; SUMIFS takes one or more. SUMIFS is the safer default because it accepts multiple criteria and is not tied to a single argument order.
Can I use these formulas in Excel for the web?
Yes. SUM, AVERAGE, IF, SUMIFS, COUNTIFS, XLOOKUP, TEXTJOIN, TRIM and PROPER all work in Excel for the web. Very old workbooks saved in legacy formats may need resaving as .xlsx first.
Why does my IF formula return FALSE instead of my text?
The text result was probably typed without double quotes, so Excel read it as a name. Put text results in quotes and leave numbers unquoted.
How do I stop a lookup formula from showing #N/A?
Wrap it in IFERROR, or use XLOOKUP's fourth argument to supply a fallback value such as "Not found".
Should I use whole-column references like A:A?
They are convenient and safe for SUM and COUNTIFS, but avoid them in array-heavy or lookup formulas on very large sheets, where they can slow recalculation. Limit ranges to the rows you actually use.