All Excel Functions With Examples

Advertisement

Excel functions are powerful tools that allow users to perform a wide variety of calculations and data manipulation tasks within Microsoft Excel. With hundreds of built-in functions, Excel can handle everything from basic arithmetic to complex statistical analysis and data modeling. This article will cover various categories of Excel functions, providing explanations and examples for each function to help users understand their applications better.

1. Mathematical Functions



Mathematical functions in Excel allow users to perform calculations involving numbers. Here are some of the most commonly used mathematical functions:

1.1 SUM


The SUM function adds together a range of numbers.

Syntax: `SUM(number1, [number2], ...)`

Example:
```excel
=SUM(A1:A5)
```
This formula adds all the values from cells A1 to A5.

1.2 AVERAGE


The AVERAGE function calculates the mean of a specified range of numbers.

Syntax: `AVERAGE(number1, [number2], ...)`

Example:
```excel
=AVERAGE(B1:B5)
```
This formula calculates the average of the values from cells B1 to B5.

1.3 MIN and MAX


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

Syntax:
- MIN: `MIN(number1, [number2], ...)`
- MAX: `MAX(number1, [number2], ...)`

Example:
```excel
=MIN(C1:C5)
=MAX(C1:C5)
```
These formulas return the minimum and maximum values from cells C1 to C5, respectively.

2. Text Functions



Text functions are used to manipulate strings of text within Excel.

2.1 CONCATENATE / CONCAT


The CONCATENATE function joins multiple text strings into one. In newer versions of Excel, CONCAT is recommended.

Syntax:
- CONCATENATE: `CONCATENATE(text1, [text2], ...)`
- CONCAT: `CONCAT(text1, [text2], ...)`

Example:
```excel
=CONCATENATE("Hello, ", "World!")
=CONCAT(A1, B1)
```
The first formula outputs "Hello, World!", while the second concatenates the values of cells A1 and B1.

2.2 LEFT, RIGHT, MID


These functions extract specific portions of a text string.

Syntax:
- LEFT: `LEFT(text, [num_chars])`
- RIGHT: `RIGHT(text, [num_chars])`
- MID: `MID(text, start_num, num_chars)`

Example:
```excel
=LEFT(D1, 5)
=RIGHT(D1, 3)
=MID(D1, 2, 4)
```
These formulas extract the first 5 characters, last 3 characters, and 4 characters starting from the 2nd character of the string in D1, respectively.

2.3 UPPER, LOWER, TRIM


These functions modify the case of text and remove extra spaces.

Syntax:
- UPPER: `UPPER(text)`
- LOWER: `LOWER(text)`
- TRIM: `TRIM(text)`

Example:
```excel
=UPPER(E1)
=LOWER(E1)
=TRIM(E1)
```
The first formula converts the text in E1 to uppercase, the second to lowercase, and the third removes extra spaces.

3. Logical Functions



Logical functions are used to perform logical operations and return TRUE or FALSE.

3.1 IF


The IF function checks a condition and returns one value if TRUE and another if FALSE.

Syntax: `IF(logical_test, value_if_true, value_if_false)`

Example:
```excel
=IF(F1 > 10, "High", "Low")
```
This formula returns "High" if the value in F1 is greater than 10, otherwise it returns "Low".

3.2 AND, OR, NOT


These functions perform logical operations.

Syntax:
- AND: `AND(logical1, [logical2], ...)`
- OR: `OR(logical1, [logical2], ...)`
- NOT: `NOT(logical)`

Example:
```excel
=AND(G1 > 5, G1 < 15)
=OR(H1 = "Yes", H1 = "Maybe")
=NOT(I1 = "No")
```
These formulas check if G1 is between 5 and 15, if H1 equals "Yes" or "Maybe", and if I1 does not equal "No", respectively.

4. Lookup and Reference Functions



Lookup and reference functions are essential for searching and retrieving data.

4.1 VLOOKUP


The VLOOKUP function searches for a value in the first column of a range and returns a value in the same row from a specified column.

Syntax: `VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])`

Example:
```excel
=VLOOKUP(J1, A1:C10, 3, FALSE)
```
This formula looks for the value in J1 within the first column of the range A1:C10 and returns the corresponding value from the third column.

4.2 HLOOKUP


Similar to VLOOKUP, but searches for values in the first row of a table.

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

Example:
```excel
=HLOOKUP(K1, A1:F2, 2, FALSE)
```
This formula searches for the value in K1 in the first row of the range A1:F2 and returns the corresponding value from the second row.

4.3 INDEX and MATCH


INDEX returns the value of a cell in a specified row and column, while MATCH returns the relative position of a value in a range.

Syntax:
- INDEX: `INDEX(array, row_num, [column_num])`
- MATCH: `MATCH(lookup_value, lookup_array, [match_type])`

Example:
```excel
=INDEX(A1:A10, MATCH(L1, B1:B10, 0))
```
This formula finds the position of the value in L1 within B1:B10 and returns the corresponding value from A1:A10.

5. Date and Time Functions



Excel has a variety of functions for working with dates and times.

5.1 TODAY and NOW


The TODAY function returns the current date, while NOW returns the current date and time.

Syntax:
- TODAY: `TODAY()`
- NOW: `NOW()`

Example:
```excel
=TODAY()
=NOW()
```
These formulas return the current date and current date and time, respectively.

5.2 DATE and TIME


The DATE function creates a date from year, month, and day, and the TIME function creates a time from hour, minute, and second.

Syntax:
- DATE: `DATE(year, month, day)`
- TIME: `TIME(hour, minute, second)`

Example:
```excel
=DATE(2023, 10, 5)
=TIME(14, 30, 0)
```
These formulas create a date of October 5, 2023, and a time of 2:30 PM.

5.3 YEAR, MONTH, DAY


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

Syntax:
- YEAR: `YEAR(serial_number)`
- MONTH: `MONTH(serial_number)`
- DAY: `DAY(serial_number)`

Example:
```excel
=YEAR(M1)
=MONTH(M1)
=DAY(M1)
```
These formulas return the year, month, and day of the date in M1, respectively.

6. Financial Functions



Financial functions are used for performing various financial calculations.

6.1 PMT


The PMT function calculates the payment for a loan based on constant payments and a constant interest rate.

Syntax: `PMT(rate, nper, pv, [fv], [type])`

Example:
```excel
=PMT(5%/12, 60, -10000)
```
This formula calculates the monthly payment for a loan of $10,000 at an annual interest rate of 5% over 60 months.

6.2 FV


The FV function calculates the future value of an investment based on periodic, constant payments and a constant interest rate.

Syntax: `FV(rate, nper, pmt, [pv], [type])`

Example:
```excel
=FV(5%/12, 60, -200, 0)
```
This formula calculates the future value of an investment of $200 per month for 60 months at an annual interest rate of 5%.

7. Statistical Functions



Statistical functions

Frequently Asked Questions


What is the purpose of the SUM function in Excel?

The SUM function is used to add together a range of numbers. For example, =SUM(A1:A5) adds all the values from cells A1 to A5.

How does the VLOOKUP function work in Excel?

The VLOOKUP function searches for a value in the first column of a table and returns a value in the same row from a specified column. For example, =VLOOKUP(B1, A1:C10, 2, FALSE) looks for the value in B1 within the range A1:C10 and returns the corresponding value from the second column.

What is the difference between COUNT and COUNTA functions?

COUNT counts only numeric values in a range, while COUNTA counts all non-empty cells, including text. For example, COUNT(A1:A5) counts numbers, while COUNTA(A1:A5) counts all non-empty cells.

Can you explain the CONCATENATE function with an example?

The CONCATENATE function is used to join two or more text strings into one string. For example, =CONCATENATE(A1, ' ', B1) combines the text in A1 and B1 with a space in between.

What does the IF function do in Excel?

The IF function checks whether a condition is true or false and returns one value for true and another for false. For example, =IF(A1>10, 'Over 10', '10 or less') will return 'Over 10' if A1 is greater than 10.

How do you use the AVERAGE function in Excel?

The AVERAGE function calculates the mean of a group of numbers. For example, =AVERAGE(A1:A5) returns the average of the values in cells A1 to A5.

What is the purpose of the MAX function?

The MAX function returns the largest value in a set of values. For example, =MAX(A1:A5) gives the highest number from the range A1 to A5.

How can the LEFT and RIGHT functions be used in Excel?

The LEFT function extracts a specified number of characters from the start of a text string, while RIGHT does the same from the end. For example, =LEFT(A1, 3) returns the first three characters of the string in A1, and =RIGHT(A1, 2) returns the last two characters.

What is the purpose of the INDEX and MATCH functions together?

Using INDEX and MATCH together allows for more flexible lookups than VLOOKUP. For example, =INDEX(B1:B10, MATCH(D1, A1:A10, 0)) finds the value in B1:B10 that corresponds to the row where D1 matches a value in A1:A10.