=).SUM, AVERAGE).A1).A1:C5).A1) that changes automatically when the formula is copied to another cell.$) before the column letter, row number, or both (e.g., $A$1).The basic syntax for a function is its name followed by one or more arguments in parentheses.
=FUNCTION_NAME(argument1, argument2, ...)
FUNCTION_NAME: The name of the function (e.g., VLOOKUP).argument1: The first required input for the function, which can be a value, cell reference, range, or another function.argument2: Optional or required additional inputs.Example: =SUM(A1:A10) calculates the sum of the values in the range A1 through A10.
| Function | Syntax | Description |
|---|---|---|
| SUM | =SUM(range) | Adds all numbers in a range of cells. |
| AVERAGE | =AVERAGE(range) | Calculates the average of numbers in a range. |
| COUNT | =COUNT(range) | Counts the number of cells that contain numbers. |
| COUNTA | =COUNTA(range) | Counts the number of cells that are not empty. |
| MAX / MIN | =MAX(range) | Returns the largest / smallest value in a range. |
| Function | Syntax | Description |
|---|---|---|
| IF | =IF(logical_test, value_if_true, value_if_false) | Checks if a condition is met and returns one value if true, and another if false. |
| AND / OR | =AND(logical1, [logical2], ...) | Returns TRUE if all arguments are true (AND) or if any argument is true (OR). Often used inside an IF statement. |
| IFERROR | =IFERROR(value, value_if_error) | Returns a specified value if a formula evaluates to an error; otherwise, returns the result of the formula. |
| Function | Syntax | Description |
|---|---|---|
| VLOOKUP | =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) | Looks for a value in the first column of a table and returns a value in the same row from a specified column. |
| INDEX | =INDEX(array, row_num, [col_num]) | Returns a value from a table or range based on a row and column number. |
| MATCH | =MATCH(lookup_value, lookup_array, [match_type]) | Finds the position of a value within a range. |
| XLOOKUP | =XLOOKUP(lookup_value, lookup_array, return_array, ...) | A modern, more flexible replacement for VLOOKUP. (Available in newer Excel versions). |
Combining INDEX and MATCH is more powerful and flexible than VLOOKUP because it can look up values in any column, not just the first one.
MATCH to find the row number of your lookup value. =MATCH("Product B", A1:A10, 0) might return `3`, meaning "Product B" is in the 3rd row.INDEX to retrieve the value from the desired column at that row number. =INDEX(B1:B10, [result from MATCH]).MATCH function inside the INDEX function.
=INDEX(B1:B10, MATCH("Product B", A1:A10, 0))
This formula finds "Product B" in column A and returns the corresponding value from column B.
F4): After entering a cell reference in a formula, press F4 to cycle between relative (A1), absolute ($A$1), mixed row (A$1), and mixed column ($A1).Ctrl + `): Press Ctrl and the backtick key (`) to display all formulas in the worksheet instead of their results. Press it again to switch back.Alt + =): Select a cell below a column of numbers (or to the right of a row) and press Alt + = to automatically insert a SUM formula.Ctrl + E): If you have a pattern in your data (like extracting first names from a full name column), type one example, then go to the cell below and press Ctrl + E. Excel will attempt to fill in the rest automatically.| Feature | VLOOKUP | XLOOKUP |
|---|---|---|
| Lookup Column | Must be the first column in the table array. | Can be any column. |
| Return Column | Specified by a column number, which can break if columns are inserted/deleted. | Specified as a separate range, which is more robust. |
| Default Match | Approximate match by default (often causes errors). | Exact match by default (safer). |
| Direction | Can only look from left to right. | Can look in any direction. Can also search from bottom-to-top. |
Goal: Calculate a 10% commission for salespeople who sold over $5,000, and 5% for all others. The sales amount is in cell B2.
=IF(B2 > 5000, B2 * 0.10, B2 * 0.05)
B2 > 5000B2 * 0.10 (Calculates 10% commission)B2 * 0.05 (Calculates 5% commission)#VALUE!: An incorrect data type is used. For example, trying to add a number to a text string.#REF!: The formula refers to a cell that is not valid. This often happens when you delete a cell, row, or column that a formula was referencing.#N/A: "Not Available." The formula cannot find the value it was asked to look for. Common in VLOOKUP or MATCH.#DIV/0!: You are trying to divide a number by zero. Check your denominator.#NAME?: Excel doesn't recognize the text in the formula, usually because of a typo in a function name.