Excel Formulas: Basic And Advanced MS Excel Formulas With Examples
| Summary: Microsoft Excel offers more than 500 built-in functions for calculations, data management, and analysis. A January 2024 reference lists 510 Excel functions, covering areas such as financial calculations, text manipulation, statistics, and data lookup. Functions such as SUM, IF, and VLOOKUP help users simplify repetitive tasks, manage large datasets, and improve calculation accuracy. |
Microsoft Excel is one of the most widely used spreadsheet applications for organizing data, performing calculations, and creating reports. Whether you are managing expenses, analyzing business information, or preparing academic records, knowing how to use Excel can make everyday tasks much easier.
One of its most useful features is the ability to perform calculations using built-in functions and formulas. From simple addition to advanced data analysis, Excel formulas help users complete tasks quickly and reduce manual errors. In this blog, we will explore basic and advanced formulas, their uses, syntax, and practical examples to help you work more efficiently in Excel.
MS Excel Formulas List: Basic to Advanced
Excel offers several functions for different spreadsheet tasks. Some are useful for beginners, while others help experienced users manage large datasets and perform advanced calculations.
The following sections cover commonly used MS Excel formulas, along with their syntax and practical examples:
i. Basic Excel Formulas for Beginners
These basic functions are useful for everyday calculations. They help users add numbers, calculate averages, count values, and identify the highest or lowest numbers in a dataset. Here are the basic formulas:
1. SUM
The Excel SUM formula adds numbers from selected cells or ranges. It is useful for calculating expenses, sales totals, marks, and other numerical values.
| Formula: =SUM(number1, [number2], …) Example: =SUM(A1:A5) If cells A1 to A5 contain 10, 20, 30, 40, and 50, the result will be 150. |
Also Read: Excel Shortcut Keys
2. AVERAGE
The AVERAGE function calculates the arithmetic mean of selected numbers. It is commonly used to calculate average marks, sales, expenses, and performance scores.
| Formula: =AVERAGE(number1, [number2], …) Example: =AVERAGE(A1:A5) If the five cells contain 10, 20, 30, 40, and 50, the result will be 30. |
3. COUNT
The COUNT function counts the cells containing numerical values in a selected range. It does not count text or empty cells.
| Formula: =COUNT(value1, [value2], …) Example: =COUNT(A1:A5) If three cells contain numbers and the remaining two contain text or are empty, the result will be 3. |
4. COUNTA
The COUNTA function counts all non-empty cells in a selected range. Unlike COUNT, it includes both numbers and text.
| Formula: =COUNTA(value1, [value2], …) Example: =COUNTA(A1:A5) If four cells contain information and one cell is empty, the result will be 4. |
5. MIN and MAX
MIN and MAX are two useful functions for identifying the smallest and largest values in a dataset.
- MIN returns the smallest numerical value.
- MAX returns the largest numerical value.
| Formula: =MIN(A1:A5) Example: If the cells contain 15, 25, 10, 40, and 30, the result will be 10. Formula: =MAX(A1:A5) Example: Using the same values, the result will be 40. |
6. ROUND
The ROUND function rounds a number to a specified number of decimal places. It is useful for financial figures, percentages, and calculations that require a fixed level of precision.
Formula and example:
| Formula: =ROUND(number, num_digits) Example: =ROUND(25.678,2) The result will be 25.68 because the number is rounded to two decimal places. |
Also Read: AVERAGE Formula in Excel
ii. Commonly Used Excel Formulas
These MS Excel formulas help users perform calculations based on specific conditions. They are particularly useful for attendance records, sales reports, budgets, and other datasets. Here are some examples:
1. IF
The IF function checks whether a condition is true or false and returns a different result depending on the outcome.
| Formula: =IF(logical_test, value_if_true, value_if_false) Example: =IF(A1>=40,”Pass”,”Fail”) If A1 contains 65, Excel returns Pass. If it contains 30, Excel returns Fail. |
2. SUMIF and SUMIFS
SUMIF adds values that meet one specific condition, whereas SUMIFS adds values that meet multiple conditions.
| SUMIF Formula: =SUMIF(range, criteria, [sum_range]) Example: =SUMIF(A2:A6,”Apple”,B2:B6) This adds the values in B2 where the corresponding cells in A2 contain Apple. SUMIFS Formula: =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …) Example: =SUMIFS(C2:C6,A2:A6,”Apple”,B2:B6,”North”) This adds values in column C where column A contains Apple and column B contains North. |
3. COUNTIF and COUNTIFS
COUNTIF counts the number of cells that meet one condition. COUNTIFS counts cells or records that meet multiple conditions.
| COUNTIF Formula: =COUNTIF(range, criteria) Example: =COUNTIF(A1:A10,”Pass”) This counts the number of cells containing Pass. COUNTIFS Formula: =COUNTIFS(criteria_range1, criteria1, criteria_range2, criteria2, …) Example: =COUNTIFS(A1:A10,”Pass”,B1:B10,”Female”) This counts records where column A contains ‘Pass ’, and column B contains ‘Female’. |
4. AVERAGEIF
The AVERAGEIF function calculates the average of numbers that meet a particular condition.
| Formula: =AVERAGEIF(range, criteria, [average_range]) Example: =AVERAGEIF(A1:A5,”>50″,B1:B5) This calculates the average of values in B1 where the corresponding values in A1 are greater than 50. |
5. AND and OR
AND and OR are logical functions used to check multiple conditions.
- AND returns TRUE only when all the given conditions are true.
- OR returns TRUE when at least one of the given conditions is true.
| AND Formula: =AND(logical1, [logical2], …) Example: =AND(A1>=40,B1>=40) This returns TRUE only when both A1 and B1 are 40 or above. OR Formula: =OR(logical1, [logical2], …) Example: =OR(A1>=40,B1>=40) This returns TRUE when either A1 or B1 contains a value of 40 or above. |
6. IFERROR
The IFERROR function displays a specified result when a formula produces an error. It helps keep spreadsheets easier to read and understand.
| Formula: =IFERROR(value, value_if_error) Example: =IFERROR(A1/B1,”Check Value”) If B1 contains zero and the division produces an error, Excel displays Check Value instead. |
iii. Excel Formulas for Data Lookup
Lookup functions help users find specific information within large datasets. They are especially useful for searching employee details, product prices, customer records, and other information stored in tables. Here are some Excel formulas for data lookup functions:
1. VLOOKUP
VLOOKUP stands for Vertical Lookup. It searches for a value in the first column of a selected table and returns a corresponding value from another column in the same row. The VLOOKUP formula is particularly useful when you need to find information without manually searching through an entire spreadsheet.
| Formula: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) Example: =VLOOKUP(101,A2:C10,2,FALSE) This searches for employee ID 101 in the first column of A2 and returns the corresponding value from the second column. FALSE specifies an exact match. |
2. XLOOKUP
XLOOKUP searches for a particular value in a range and returns the corresponding value from another range. Unlike VLOOKUP, it can search in different directions and does not require a column index number.
| Formula: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found]) Example: =XLOOKUP(101,A2:A10,B2:B10,”Not Found”) This searches for employee ID 101 in A2 and returns the matching information from B2. If the ID is unavailable, it displays Not Found. |
3. HLOOKUP
HLOOKUP stands for Horizontal Lookup. It searches for a value in the first row of a selected range and returns information from a specified row in the same column.
| Formula: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) Example: =HLOOKUP(“Sales”,A1:D4,3,FALSE) This searches for Sales in the first row and returns the corresponding value from the third row of the selected range. |
4. INDEX and MATCH
INDEX and MATCH are commonly used together to find information in a dataset.
- INDEX returns a value from a specified position in a range.
- MATCH identifies the position of a particular value within a range.
| INDEX Formula: =INDEX(array, row_num, [column_num]) MATCH Formula: =MATCH(lookup_value, lookup_array, [match_type]) Combined Example: =INDEX(B2:B10,MATCH(101,A2:A10,0)) This searches for employee ID 101 in A2 and returns the corresponding value from B2. |


iv. Excel Formulas for Text Manipulation
Text functions help users organize, edit, combine, and extract information from cells. They are useful for names, addresses, product codes, and other text-based information. Here are some MS Excel formulas for text manipulation tasks:
1. LEFT, RIGHT, and MID
The following functions extract specific characters from a text string:
- LEFT extracts characters from the beginning of a text string.
- RIGHT extracts characters from the end.
- MID extracts characters from a specified position.
| LEFT Formula: =LEFT(text, num_chars) Example: =LEFT(“EXCEL”,2) returns EX. RIGHT Formula: =RIGHT(text, num_chars) Example: =RIGHT(“EXCEL”,2) returns EL. MID Formula: =MID(text, start_num, num_chars) Example: =MID(“EXCEL”,2,3) returns XCE. |
2. LEN
The LEN function counts the total number of characters in a text string, including spaces.
| Formula: =LEN(text) Example: =LEN(“Microsoft Excel”) The result will be 15 because the text contains 15 characters, including the space. |
3. TRIM
The TRIM function removes unnecessary spaces from text. It keeps single spaces between words while removing extra spaces at the beginning and end.
| Formula: =TRIM(text) Example: =TRIM(A1) If A1 contains ” Hello World “, the result will be “Hello World”. |
4. CONCAT and TEXTJOIN
CONCAT combines text from different cells into one text string. TEXTJOIN also combines text but lets users specify a separator between values.
| CONCAT Formula: =CONCAT(text1, [text2], …) Example: =CONCAT(A1,” “,B1) If A1 contains John and B1 contains Smith, the result will be John Smith. TEXTJOIN Formula: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], …) Example: =TEXTJOIN(“, “,TRUE,A1:A3) |
This combines the values in A1 with a comma and space between them, ignoring empty cells.
5. UPPER, LOWER, and PROPER
The following functions change the letter case of text in a cell:
- UPPER converts all letters into capital letters.
- LOWER converts all letters into lowercase.
- PROPER capitalizes the first letter of each word.
| UPPER Formula: =UPPER(text) Example: =UPPER(“excel”) returns EXCEL. LOWER Formula: =LOWER(text) Example: =LOWER(“EXCEL”) returns excel. PROPER Formula: =PROPER(text) Example: =PROPER(“microsoft excel”) returns Microsoft Excel. |
6. FIND and SEARCH
FIND and SEARCH locate the position of a particular character or word within a text string.
The main difference is that FIND is case-sensitive, while SEARCH is not.
| FIND Formula: =FIND(find_text, within_text, [start_num]) Example: =FIND(“E”, “EXCEL”) returns 1. SEARCH Formula: =SEARCH(find_text, within_text, [start_num]) Example: =SEARCH(“e”, “EXCEL”) returns 1 because SEARCH ignores letter case. |
v. Excel Formulas for Dates and Times
Excel provides several functions to work with dates, calculate time differences, and manage working days. The following MS Excel formulas are useful for tracking deadlines, employee attendance, project schedules, and work periods.
1. TODAY and NOW
TODAY returns the current date, whereas NOW returns the current date and time.
| TODAY Formula: =TODAY() Example: Entering this formula displays the current date according to your system settings. NOW Formula: =NOW() Example: This displays the current date and time. |
2. DATE
The DATE function creates a valid date using separate year, month, and day values.
| Formula: =DATE(year, month, day) Example: =DATE(2026,11,6) The result will be 6 November 2026, displayed according to the cell’s date format. |
3. DAY, MONTH, and YEAR
The following functions extract individual parts of a date:
- DAY returns the day of the month.
- MONTH returns the month number.
- YEAR returns the year.
| DAY Formula: =DAY(A1) Example: If A1 contains 06/11/2026, the result will be 6. MONTH Formula: =MONTH(A1) Example: The result will be 11. YEAR Formula: =YEAR(A1) Example: The result will be 2026. |
4. DATEDIF
DATEDIF calculates the difference between two dates in years, months, or days. It is useful for calculating age, employment duration, and project periods.
| Formula: =DATEDIF(start_date, end_date, unit) Example: =DATEDIF(A1,B1,”Y”) If A1 contains 01/01/2020 and B1 contains 01/01/2026, the result will be 6 years. |
5. NETWORKDAYS
NETWORKDAYS calculates the number of working days between two dates. By default, it excludes Saturdays and Sundays. You can also provide a list of holidays to exclude.
| Formula: =NETWORKDAYS(start_date, end_date, [holidays]) Example: =NETWORKDAYS(A1,B1,C1:C5) This calculates the working days between the dates in A1 and B1, excluding weekends and the holidays listed in C1. |
6. WORKDAY
WORKDAY calculates a date after a specified number of working days. It excludes weekends and can also exclude holidays.
| Formula: =WORKDAY(start_date, days, [holidays]) Example: =WORKDAY(A1,10,C1:C5) This returns the date that falls 10 working days after the date in A1, excluding weekends and the listed holidays. |
vi. Advanced Excel Formulas
Advanced Excel functions help users manage large datasets, organize information, and perform more complex calculations. The following Excel formulas are especially useful for data analysis and reporting.
1. FILTER
The FILTER function extracts information from a dataset based on specified conditions. It returns only the rows or columns that match the given criteria.
| Formula: =FILTER(array, include, [if_empty]) Example: =FILTER(A2:B10,B2:B10=”Sales”,”No Results”) This returns the rows from A2 where the corresponding cells in column B contain Sales. |
2. SORT and SORTBY
SORT arranges data in ascending or descending order. SORTBY arranges a range based on the values in another range.
| SORT Formula: =SORT(array, [sort_index], [sort_order], [by_col]) Example: =SORT(A2:B10,2,1) This sorts the selected data based on the second column in ascending order. SORTBY Formula: =SORTBY(array, by_array1, [sort_order1], …) Example: =SORTBY(A2:B10,B2:B10,-1) This sorts the data in A2 according to the values in B2 in descending order. |
3. UNIQUE
The UNIQUE function returns distinct values from a selected range. It is useful for removing duplicate entries when preparing reports or organizing records.
| Formula: =UNIQUE(array, [by_col], [exactly_once]) Example: =UNIQUE(A2:A10) This returns a list of distinct values from A2 without repeating duplicates. |
4. SUBTOTAL
The SUBTOTAL function performs calculations such as SUM, AVERAGE, COUNT, MIN, and MAX on a selected range. It is particularly useful when working with filtered datasets because it can exclude filtered-out rows.
| Formula: =SUBTOTAL(function_num, ref1, [ref2], …) Example: =SUBTOTAL(9,A2:A10) This calculates the sum of the visible values in A2 when filters are applied. The function number 9 represents SUM. |
5. SUMPRODUCT
SUMPRODUCT multiplies corresponding values in selected arrays and then adds the resulting products. It is useful for calculating total costs, sales values, and weighted calculations.
| Formula: =SUMPRODUCT(array1, [array2], …) Example: =SUMPRODUCT(A2:A5,B2:B5) If A2 contains product quantities and B2 contains their prices, the function calculates the total value by multiplying each quantity by its corresponding price and adding the results. |
6. LET
The LET function assigns names to calculation results or values within a formula. It makes complex formulas easier to read, organize, and reuse. It can also avoid calculating the same expression multiple times.
| Formula: =LET(name1, name_value1, calculation_or_name2, …) Example: =LET(total,A1+B1,total*10%) This first calculates the total of A1 and B1, assigns it the name total, and then calculates 10% of that amount. |
Conclusion
Microsoft Excel is a robust spreadsheet application that has been around for more than three decades. With additional features and capabilities added throughout time, it has developed into a vital tool for corporations, researchers, financial analysts, and regular people alike. Excel has made it possible for users to carry out intricate calculations, evaluate data, and make informed decisions through its useful basic and advanced Excel formulas, user-friendly functions, and customizable charts and graphs. Excel continues to be a popular option due to its adaptability and accessibility.
FAQs
The Excel function library contains more than 475 formulas to use in different Excel operations.
A function is a pre-defined formula in Microsoft Excel. The functions like SUM, AVERAGE, MAX, MIN are supported by Excel.
Formulas in MS Excel always start with an equal(=) sign.
Formulas like SUM, AVERAGE, COUNT, COUNTA, IF, TRIM, MAX, and MIN are frequently used in Excel.
Cell references enable us to do calculations of data from other cells, making it easy to update and modify computations as per need.
