Mastering Excel formulas is the fastest way to transform raw data into actionable insights, automate repetitive tasks, and eliminate human error in calculations. This guide covers the core formulas every user needs, including SUM, AVERAGE, VLOOKUP, XLOOKUP, IF, and COUNTIF, along with practical examples of how to apply them correctly. You will need a modern version of Microsoft Excel (2016 or later recommended for XLOOKUP) installed on a Windows or Mac computer, and a spreadsheet containing sample data to practice on.

What You'll Need

  • A computer with Microsoft Excel installed (2016 for newer functions, or any version for basic formulas).
  • A sample dataset to practice on, such as a list of sales figures, student grades, or inventory items.
  • A basic understanding of spreadsheet terminology (cells, ranges, and columns).

Step-by-Step

1. The SUM Function for Basic Totals

The SUM function is the most fundamental tool for adding numbers in Excel. It allows you to quickly calculate totals for a row, column, or a specific range of cells. For example, if you have sales figures in cells B2 through B10, you can sum them all with a single formula.

How to use it:

  1. Click on the cell where you want the total to appear (e.g., cell B11).
  2. Type the equals sign = to start the formula.
  3. Type SUM, then open a parenthesis (.
  4. Click and drag your mouse to select the range of cells you want to add (e.g., B2:B10).
  5. Close the parenthesis ) and press Enter.

Excel will display the sum of the selected range in the cell. This formula automatically updates if you change a number in the range B2:B10.

2. The AVERAGE Function for Central Tendency

Use the AVERAGE function to find the mean of a set of numbers. This is useful for calculating average scores, average spending, or average performance metrics. Similar to SUM, it operates on a defined range of cells.

How to use it:

  1. Click on the cell where you want the average to appear.
  2. Type =AVERAGE(.
  3. Select the range of numbers (e.g., C2:C15).

3. The VLOOKUP Function for Cross-Referencing

VLOOKUP is a powerful tool for finding specific information in a large table. It searches for a value in the first column of a range and returns a value in the same row from a specified column. While widely used, it has a limitation: it can only look to the right.

How to use it:

  1. Ensure your lookup value is in the first column of your data range.
  2. Click the cell where you want the result to appear.
  3. Type =VLOOKUP(.
  4. Select the cell containing the value you want to look for (e.g., the Product ID).
  5. Type a comma , to separate the arguments.
  6. Select the entire table range where the data is stored (e.g., A2:D15).
  7. Type a comma , to separate the range from the column index number.
  8. Enter the column number within the range from which you want to retrieve data (e.g., 4 for the 'Price' column).
  9. Type a comma , and enter 0 for exact match.

4. The XLOOKUP Function for Modern Searching

XLOOKUP is a newer, more flexible function that replaces VLOOKUP. It can search in any column and return a value from any column, making it much easier to use and less prone to errors. It requires Excel 2021 or Microsoft 365.

How to use it:

  1. Click on the cell where you want the result to appear.
  2. Type =XLOOKUP(.
  3. Select the entire column or range where Excel should search for the value (e.g., A2:A15 for Product IDs).
  4. Type a comma , to separate the search array from the return array.
  5. Select the entire column or range where Excel should find the result (e.g., D2:D15 for Prices).

5. The IF Function for Conditional Logic

The IF function allows you to make decisions based on criteria. It returns one value if a condition is true and another value if it is false. This is essential for grading systems, status updates, or flagging data.

How to use it:

  1. Type =IF(.
  2. Enter the logical test (e.g., B2>50 for 'Is the value in B2 greater than 50?').
  3. Type a comma , to separate the test from the value if true.
  4. Enter the value to return if the condition is true (e.g., "Pass").
  5. Type a comma , to separate the value if true from the value if false.
  6. Enter the value to return if the condition is false (e.g., "Fail").

6. The COUNTIF Function for Data Counting

Use COUNTIF to count the number of cells that meet a specific condition. This is useful for counting how many times a specific item appears, how many sales exceeded a target, or how many students passed a test.

How to use it:

  1. Click on the cell where you want the count to appear.
  2. Type =COUNTIF(.
  3. Select the range of cells you want to evaluate (e.g., B2:B15).
  4. Type a comma , to separate the range from the criteria.
  5. Enter the criteria in quotation marks (e.g., "Apple" or >50).

7. The CONCATENATE or TEXTJOIN Function for Merging Text

Combine text from different cells into one cell. This is useful for creating full names from first and last name columns, or generating email addresses from separate parts of a contact's information.

How to use CONCATENATE:

  1. Click on the cell where you want the merged text to appear.
  2. Type =CONCATENATE(.
  3. Select the first cell of text (e.g., A2).
  4. Type a space in quotation marks (" ") to add a space between names.
  5. Type a comma , to separate the space from the next cell.
  6. Select the second cell of text (e.g., B2).

The TEXTJOIN function is a modern alternative that is easier to use for joining lists, as it automatically handles separators.

Common Mistakes

  • Not locking ranges: When copying formulas, the cell references often shift. To lock a specific range (so it doesn't change), add dollar signs before the column and row (e.g., $B$2:$B$15). This is known as an absolute reference.
  • Mismatched parentheses: Every opening parenthesis ( must have a matching closing parenthesis ). If you forget one, Excel will return a #VALUE! error or an error message saying "The formula you typed contains an error."
  • Incorrect lookup column index: In VLOOKUP, the column index number is based on the entire range you selected, not just the columns to the right of the lookup value. For example, if your range is A2:D15 and you want to return a value from column D, the index number is 4.
  • Text vs. Number: Excel often treats numbers that look like text (e.g., imported from a website) as text, which prevents them from being used in mathematical formulas. You may need to convert them using the VALUE function or by using the Text to Columns feature.

Tips

  • Use the Formula Bar: The formula bar at the top of the spreadsheet shows the formula in the active cell. This is the best place to edit and debug complex formulas.
  • Use Tab to Navigate: When typing a formula, press the Tab key to automatically jump to the next argument placeholder. This helps ensure you don't miss a comma or a parenthesis.
  • Use AutoFill: Once you have typed a formula in one cell, you can drag the fill handle (the small square in the bottom right corner of the cell) to copy the formula to adjacent cells. Excel will automatically adjust the cell references for each new row or column.
  • Check for Errors: If a cell displays an error code (like #N/A or #REF!), click the small error icon next to the cell to see a list of possible solutions and descriptions of why the error occurred.

Troubleshooting

If your formula is not working as expected, follow these steps to identify the issue.

Formula returns a #N/A error

  • Check for typos: Ensure the lookup value exactly matches the text in the table, including spaces and capitalization.
  • Check for hidden spaces: Sometimes data imported from other sources contains invisible spaces. Use the TRIM function to remove extra spaces from the data.
  • Verify the lookup range: Make sure the lookup value is actually within the range you selected for the formula.

Formula returns a #VALUE! error

  • Check for non-numeric data: Ensure that the range used in a calculation contains only numbers. Text values will cause a #VALUE! error.
  • Check for mismatched data types: If you are using an IF function, ensure that the value_if_true and value_if_false arguments are of the same data type (e.g., both are numbers or both are text).

Formula returns a #REF! error

  • Deleted cells: This error usually occurs if you have deleted a cell or range of cells that are referenced by your formula. The formula is trying to refer to a location that no longer exists.
  • Copy-paste errors: If you copy a formula and paste it into a location with fewer columns, the formula may try to reference a column that does not exist in the new location.

Frequently Asked Questions

1. What is the difference between SUM and SUMIF?

SUM adds up all the numbers in a range. SUMIF adds up numbers in a range based on a condition. For example, SUM only totals all sales, while SUMIF can total only sales for a specific product.

2. Why does VLOOKUP return #N/A?

This error means Excel could not find the lookup value in the first column of the range you specified. Check for typos, extra spaces, or formatting differences between the lookup value and the data in the table.

3. How do I make a cell reference absolute?

To lock a cell reference so it doesn't change when you copy the formula, add dollar signs before the column letter and row number (e.g., $A$1). This creates an absolute reference.

4. Can I use Excel formulas on a Mac?

Yes, all the formulas mentioned in this guide are fully supported on Excel for Mac. The menu paths and keyboard shortcuts may differ slightly from the Windows version, but the core functionality remains the same.

5. What does the & symbol do in Excel?

The ampersand (&) is an operator used to join or concatenate text strings. It is a quick way to combine text from different cells without using the CONCATENATE function.

6. How do I find the last used row in a column?

You can use the formula =MAX(A:A) to find the highest row number in column A, but this can be unreliable if there are blank cells. A more robust method is to use the combination of MATCH and COUNTA: =MATCH(9^9, A:A).