Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Everything about Charts in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How To Filter Data in Excel
  • Randomize/ Shuffle List in Excel
  • How to Create Column Chart in Excel

References

  • Count unique text values with criteria
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Approximate match with multiple criteria in Excel
  • Last row number in range

Data Validations

  • Excel Data validation date in next 30 days
  • Excel Data validation require unique number
  • Excel Data validation must begin with
  • Excel Data validation must contain specific text
  • Excel Data validation no punctuation

25 Basic Excel Formulas and Functions Worked Examples

by

Mastering the basic Excel formulas is critical for beginners to become highly proficient in data analysis.

A formula is an expression which calculates the value of a cell. Functions are predefined formulas and are already available in Excel. Every formula in Excel starts with an equal sign, then the function name and in bracket a cell name or cell ranges or cell references. See illustration below:

=Function Name( cell name or cell ranges or cell references). Let’s begin with simple Arithmetic Operators calculation in Excel such as Addition, Subtraction and multiplication.

For example, cell A3 below contains a formula which adds the value of cell A2 to the value of cell A1.

For example, cell A3 below contains the SUM function which calculates the sum of the range A1:A2.

Enter a Formula

To enter a formula, execute the following steps.

1. Select a cell.

2. To let Excel know that you want to enter a formula, type an equal sign (=).

3. For example, type the formula A1+A2.

Tip: instead of typing A1 and A2, simply select cell A1 and cell A2.

4. Change the value of cell A1 to 3.

Excel automatically recalculates the value of cell A3. This is one of Excel’s most powerful features!

Edit a Formula

When you select a cell, Excel shows the value or formula of the cell in the formula bar.

1. To edit a formula, click in the formula bar and change the formula.

2. Press Enter.

Operator Precedence

Excel uses a default order in which calculations occur. If a part of the formula is in parentheses, that part will be calculated first. It then performs multiplication or division calculations. Once this is complete, Excel will add and subtract the remainder of your formula. See the example below.

First, Excel performs multiplication (A1 * A2). Next, Excel adds the value of cell A3 to this result.

Another example,

First, Excel calculates the part in parentheses (A2+A3). Next, it multiplies this result by the value of cell A1.

Copy/Paste a Formula

When you copy a formula, Excel automatically adjusts the cell references for each new cell the formula is copied to. To understand this, execute the following steps.

1. Enter the formula shown below into cell A4.

2a. Select cell A4, right click, and then click Copy (or press CTRL + c)…

…next, select cell B4, right click, and then click Paste under ‘Paste Options:’ (or press CTRL + v).

2b. You can also drag the formula to cell B4. Select cell A4, click on the lower right corner of cell A4 and drag it across to cell B4. This is much easier and gives the exact same result!

Result. The formula in cell B4 references the values in column B.

Using Excel in-built functions

Insert a Function

Every function has the same structure. For example, SUM(A1:A4). The name of this function is SUM. The part between the brackets (arguments) means we give Excel the range A1:A4 as input. This function adds the values in cells A1, A2, A3 and A4. It’s not easy to remember which function and which arguments to use for each task. Fortunately, the Insert Function feature in Excel helps you with this.

To insert a function, execute the following steps.

1. Select a cell.

2. Click the Insert Function button.

The ‘Insert Function’ dialog box appears.

3. Search for a function or select a function from a category. For example, choose COUNTIF from the Statistical category.

4. Click OK.

The ‘Function Arguments’ dialog box appears.

5. Click in the Range box and select the range A1:C2.

6. Click in the Criteria box and type >5.

7. Click OK.

Result. The COUNTIF function counts the number of cells that are greater than 5.

Note: instead of using the Insert Function feature, simply type =COUNTIF(A1:C2,”>5″). When you arrive at: =COUNTIF( instead of typing A1:C2, simply select the range A1:C2.

Worked Example: Sum Function Formula

The SUM() function, as the name suggests, gives the total of the selected range of cell values. It performs the mathematical operation which is addition. Here’s an example of it below:

Excel Sum Function Worked Example

As you can see above, to find the total amount of sales for every unit, we had to simply type in the function “=SUM(D2:C5)”. This automatically adds up 1200, 600, 400 and 540. The result is stored in D6.

Worked Example: Average Function Formula

The AVERAGE() function focuses on calculating the average of the selected range of cell values. As seen from the below example, to find the avg of the total sales, you have to simply type in “AVERAGE(D2, D3, D4,D5)”.

Excel Average Function Worked Example

It automatically calculates the average, and you can store the result in your desired location.

Worked Example: Count Function Formula

The function COUNT() counts the total number of cells in a range that contains a number. It does not include the cell, which is blank, and the ones that hold data in any other format apart from numeric.

Excel Count Function Worked Example
Excel Count Function Worked Example

As seen above, here, we are counting from C1 to C4, ideally four cells. But since the COUNT function takes only the cells with numerical values into consideration, the answer is 3 as the cell containing “Total Sales” is omitted here.

Worked Example: Subtotal Function Formula

Moving ahead, let’s now understand how the subtotal function works. The SUBTOTAL() function returns the subtotal in a database. Depending on what you want, you can select either average, count, sum, min, max, min, and others. Let’s have a look at two such examples.

Excel Subtotal Function Worked Example
Fig: Excel Subtotal Function Worked Example.

In the example above, we have performed the subtotal calculation on cells ranging from A2 to A4. As you can see, the function used is “=SUBTOTAL(1, B2: B5), in the subtotal list “1” refers to average. Hence, the above function will give the average of B2: B5 and the answer to it is 13.5, which is stored in D6.

Similarly, “=SUBTOTAL(4, B2: B5)” selects the cell with the maximum value from B2 to B5, which is 20. Incorporating “4” in the function provides the maximum result.

Excel Subtotal Function Maximum Worked Example

Worked Example: Modulus Function Formula

The MOD() function works on returning the remainder when a particular number is divided by a divisor. Let’s now have a look at the examples below for better understanding.

In the first example, we have divided 20 by 3. The remainder is calculated using the function “=MOD(B2,3)”. The result is stored in B2. We can also directly type “=MOD(20,3)” as it will give the same answer.
modulus

Excel Modulus function Worked Example
Fig: Excel Modulus function Worked Example

Similarly, here, we have divided 12 by 3. The remainder is 0 is, which is stored in C3.

Worked Example: Power Function Formula

The function “Power()” returns the result of a number raised to a certain power. Let’s have a look at the examples shown below:

Excel Power function Worked Example
Fig: Excel Power function Worked Example

As you can see above, to find the power of 20 stored in B2 raised to 3, we have to type “= POWER (B2,3)”. This is how power function works in Excel.

Worked Example: Ceiling Function Formula

Next, we have the ceiling function. The CEILING() function rounds a number up to its nearest multiple of significance.

Excel Ceiling function Worked Example
Fig: Excel Ceiling function Worked Example

The nearest highest multiple of 5 for 45.316 is 50, 42.86 is 45 and so on.

Worked Example: Floor Function Formula

Contrary to the Ceiling function, the floor function rounds a number down to the nearest multiple of significance.

Excel Floor Function Worked Example
Fig: Excel Floor Function Worked Example

The nearest lowest multiple of 5 for 45.316 is 45.

Worked Example: Concatenate Function Formula

This function merges or joins several text strings into one text string. Given below are the different ways to perform this function.

In this example, we have operated with the syntax =CONCATENATE(A25, ” “, B25)
concatenate

Method 1

Excel Concatenate Function Worked Example
Fig: Excel Concatenate Function Worked Example

Method 2

In this example, we have operated with the syntax using alternate method =A2&” “&B2
concatenate-function.

Alternate Excel Concatenate Function Worked Example
Fig: Alternate Excel Concatenate Function Worked

Worked Example: Len Function Formula

The function LEN() returns the total number of characters in a string. So, it will count the overall characters, including spaces and special characters. Given below is an example of the Len function.

Excel Length Function Worked Example
Fig: Excel Length Function Worked Example.

Worked Example: Replace Function Formula

As the name suggests, the REPLACE() function works on replacing the part of a text string with a different text string.

The syntax is “=REPLACE(old_text, start_num, num_chars, new_text)”. Here, start_num refers to the index position you want to start replacing the characters with. Next, num_chars indicate the number of characters you want to replace.

Let’s have a look at the ways we can use this function.

Here, we are replacing A101 with B101 by typing “=REPLACE(A2,1,1,”B”)”.

Excel Replace Function Worked Example
Fig: Excel Replace Function Worked Example

Next, we are replacing A102 with VX102 by typing “=REPLACE(A2,1,1, “VX”)”.

Excel Replace Two Characters Function Worked Example

UPPER, LOWER, PROPER

The UPPER() function converts any text string to uppercase. In contrast, the LOWER() function converts any text string to lowercase. The PROPER() function converts any text string to proper case, i.e., the first letter in each word will be in uppercase, and all the other will be in lowercase.

Let’s understand this better with the following examples:

Worked Example: Upper Function Formula

Here, we have converted the text range A2-A5 to Capital Letters in B2-B5.

Excel Upper Function Worked Example
Fig: Excel Upper Function Worked Example

Worked Example: Lower Function Formula

Now, we have converted the text range A2-A5 to Small Letters in B2-B5.

Excel Lower Function Worked Example
Fig: Excel Lower Function Worked Example

Worked Example: Proper Function Formula

Finally, we have converted the improper text in range A2-A5 to Initial Caps in B2-B5.

Excel Proper Function Worked Example
Fig: Excel Proper Function Worked Example

Now, let us hop on to exploring some date and time functions in Excel.

LEFT, RIGHT, MID

The LEFT() function gives the number of characters from the start of a text string. Meanwhile, the MID() function returns the characters from the middle of a text string, given a starting position and length. Finally, the right() function returns the number of characters from the end of a text string.

Let’s understand these functions with a few examples.

Worked Example: Left Function Formula

In the example below, we use the function left to extract 6 leftmost numbers from the “text string”/numbers in the table.

Excel Left Function Worked Example
Fig: Excel Left Function Worked Example

Worked Example: Mid Function Formula

Shown below is an example using the mid function.

Excel Mid Function Worked Example
Fig: Excel Mid Function Worked Example

Worked Example: Right Function Formula

Here, we have an example of the right function. The example below, illustrates the use of Right function to extract the last 4 numbers from the right of the “text string”/numbers in the table.

Excel Right Function Worked Example
Fig: Excel Right Function Worked Example

Worked Example: Now() Function Formula

The NOW() function in Excel gives the current system date and time.

Excel Now Function Worked Example
Fig: Excel Now Function Worked Example

The result of the NOW() function will change based on your system date and time.

Worked Example: Today() Function Formula

Excel Today Function Worked Example
Fig: Excel Today Function Worked Example

The TODAY() function in Excel provides the current system date.

Worked Example: Day() Function Formula

The function DAY() is used to return the day of the month. It will be a number between 1 to 31. 1 is the first day of the month, 31 is the last day of the month.

Excel Day Function Worked Example
Fig: Excel Day Function Worked Example

Worked Example: Month() Function Formula

The MONTH() function returns the month, a number from 1 to 12, where 1 is January and 12 is December.

Excel Month Function Worked Example
Fig: Excel Month Function Worked Example

Worked Example: Year() Function Formula

The YEAR() function, as the name suggests, returns the year from a date value.

Excel Year Function Worked Example
Fig: Excel Year Function Worked Example

Worked Example: Time() Function Formula

The TIME() function converts hours, minutes, seconds given as numbers to an Excel serial number, formatted with a time format.

Excel Time Function Worked Example
Fig: Excel Time Function Worked Example

HOUR, MINUTE, SECOND

Worked Example: Hour() Function Formula

The HOUR() function generates the hour from a time value as a number from 0 to 23. Here, 0 means 12 AM and 23 is 11 PM.

Excel Hour Function Worked Example
Fig: Excel Hour Function Worked Example

Worked Example: Minute() Function Formula

The function MINUTE(), returns the minute from a time value as a number from 0 to 59.

Excel Minute Function Worked Example
Fig: Excel Minute Function Worked Example

Worked Example: Second() Function Formula

The SECOND() function returns the second from a time value as a number from 0 to 59.

Excel Second Function Worked Example
Fig: Excel Second Function Worked Example

Worked Example: Datedif Function Formula

The DATEDIF() function provides the difference between two dates in terms of years, months, or days.

Below is an example of a DATEDIF function where we calculate the current age of a person based on two given dates, the date of birth and today’s date.

Excel Datedif Function Worked Example
Fig: Excel Datedif Function Worked Example

 

Post navigation

Previous Post:

VLOOKUP without #N/A error in Excel

Next Post:

Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF function: Description, Usage, Syntax, Examples and Explanation
  • Nested IF function example in Excel
  • IF with wildcards in Excel
  • Complete List of Excel Logical Functions, References and Examples
  • Invoice status with nested if in Excel

Date Time

  • Convert date string to date time in Excel
  • TODAY function: Description, Usage, Syntax, Examples and Explanation
  • Get first Monday before any date in Excel
  • Get month name from date in Excel
  • How to determine year is a leap year in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel
  • How to randomly assign data to groups in Excel
  • Running count group by n size in Excel
  • If cell contains one of many things in Excel

General

  • How to calculate percent of students absent in Excel
  • Convert column letter to number in Excel
  • Basic text sort formula in Excel
  • How to increase by percentage in Excel
  • How to fill cell ranges with random text values in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning