Basic Excel Formulas

 


Microsoft Excel is a powerful tool for organizing and analyzing data, and understanding the basics of formulas and functions can make a huge difference in working more efficiently. Here's an introduction to Excel formulas and functions that you can use on a daily basis:

1. Basic Excel Formulas

A formula in Excel is an expression that performs calculations on data in your worksheet. All formulas start with an equal sign (=).

Simple Arithmetic Formulas:

  • Addition: =A1 + B1
  • Subtraction: =A1 - B1
  • Multiplication: =A1 * B1
  • Division: =A1 / B1

These basic formulas allow you to perform simple calculations using cell references.

Example:

If cell A1 contains the number 10 and B1 contains the number 5, =A1 + B1 will return 15.

2. Common Excel Functions

Excel has a lot of built-in functions that can help with complex calculations. Here are some common ones:

SUM

The SUM function adds up a range of numbers.

  • Syntax: =SUM(A1:A10)
    • Adds the values in cells A1 to A10.

AVERAGE

The AVERAGE function calculates the average (mean) of a range of numbers.

  • Syntax: =AVERAGE(B1:B10)
    • Returns the average of the numbers in cells B1 to B10.

MIN and MAX

The MIN function returns the smallest number in a range, while MAX returns the largest number.

  • Syntax: =MIN(A1:A10) or =MAX(A1:A10)
    • Finds the smallest or largest value in the range A1 to A10.

COUNT

The COUNT function counts the number of cells that contain numbers in a range.

  • Syntax: =COUNT(A1:A10)
    • Counts how many cells in the range A1 to A10 contain numbers.

COUNTA

The COUNTA function counts all non-empty cells (whether they contain numbers, text, or other data types).

  • Syntax: =COUNTA(A1:A10)
    • Counts all non-empty cells in the range A1 to A10.

IF

The IF function allows you to perform conditional logic, where you specify what happens if a condition is true or false.

  • Syntax: =IF(A1 > 10, "Greater", "Less or Equal")
    • If A1 is greater than 10, it will display "Greater"; otherwise, it will display "Less or Equal".

3. Text Functions

Text functions allow you to manipulate and extract data from text cells.

CONCATENATE (or CONCAT)

The CONCATENATE function joins two or more strings together.

  • Syntax: =CONCATENATE(A1, " ", B1)
    • Joins the text in A1 with the text in B1, separated by a space.

TEXT

The TEXT function formats a number or date into a specified format.

  • Syntax: =TEXT(A1, "mm/dd/yyyy")
    • Converts a date in cell A1 into a standard date format (e.g., 09/18/2025).

LEFT / RIGHT

The LEFT and RIGHT functions extract a specified number of characters from the left or right of a text string.

  • Syntax: =LEFT(A1, 3) or =RIGHT(A1, 4)
    • LEFT(A1, 3) returns the first 3 characters from A1, and RIGHT(A1, 4) returns the last 4 characters from A1.

4. Lookup Functions

Lookup functions are used to find specific data within a table.

VLOOKUP

VLOOKUP looks up a value in a vertical table and returns a corresponding value from another column.

  • Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
    • lookup_value: The value you want to search for.
    • table_array: The range of cells containing the data.
    • col_index_num: The column number in the table from which to retrieve the value.
    • [range_lookup]: TRUE (approximate match) or FALSE (exact match).

Example:
=VLOOKUP("Product A", A2:B10, 2, FALSE)
This will look for "Product A" in the first column of the range
A2:B10 and return the corresponding value from the second column.

HLOOKUP

HLOOKUP works like VLOOKUP but searches horizontally across rows instead of vertically in columns.

  • Syntax: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

INDEX and MATCH

This combination is often preferred over VLOOKUP because it is more flexible.

  • Syntax: =INDEX(B1:B10, MATCH("Product A", A1:A10, 0))
    • MATCH finds the position of "Product A" in column A, and INDEX returns the value from column B at that position.

5. Date and Time Functions

Excel provides a variety of functions to handle date and time calculations.

TODAY

The TODAY function returns the current date.

  • Syntax: =TODAY()

NOW

The NOW function returns the current date and time.

  • Syntax: =NOW()

DATEDIF

The DATEDIF function calculates the difference between two dates.

  • Syntax: =DATEDIF(start_date, end_date, "unit")
    • The unit can be "Y" (years), "M" (months), or "D" (days).

YEAR, MONTH, DAY

These functions extract the year, month, or day from a date.

  • Syntax: =YEAR(A1), =MONTH(A1), =DAY(A1)
    • If A1 contains the date 09/18/2025, YEAR(A1) will return 2025, MONTH(A1) will return 9, and DAY(A1) will return 18.

6. Basic Tips for Using Formulas

  • Absolute vs. Relative References:
    • Relative Reference: =A1 + B1 — when you copy this formula, it changes based on the cell you move to.
    • Absolute Reference: =$A$1 + $B$1 — when you copy this formula, the references will stay fixed to A1 and B1.
  • AutoFill:
    • Use the drag handle (the small square in the bottom-right corner of a cell) to copy a formula or function across a row or column.
  • Error Checking:
    • If a formula returns an error, Excel will show a message like #DIV/0! (divide by zero), #VALUE! (incorrect value type), or #N/A (value not available).
    • You can use the IFERROR function to handle errors and return custom messages: =IFERROR(A1/B1, "Error").

These are just the basics to get you started with formulas and functions in Excel. As you work more with Excel, you’ll discover more advanced functions and techniques, but these should be enough for everyday tasks!

Post a Comment

Previous Post Next Post