Excel Formulas
Excel Formulas
Calculation Formulas
1. SUM:
The SUM formula calculates the sum of a range of cells. It is commonly used to add up numbers in Excel.
Syntax: =SUM(number1, [number2], ...)
Example: =SUM(A1:A10)
2. MIN:
The MIN formula returns the smallest value in a range of cells. It is useful for finding the minimum value in a set of data.
Syntax: =MIN(number1, [number2], ...)
Example: =MIN(A1:A10)
3. MAX:
The MAX formula returns the largest value in a range of cells. It helps in finding the maximum value in a set of data.
Syntax: =MAX(number1, [number2], ...)
Example: =MAX(A1:A10)
4. AVERAGE:
The AVERAGE formula calculates the average (arithmetic mean) of a range of cells. It is commonly used to find the average value of a set of
numbers.
Syntax: =AVERAGE(number1, [number2], ...)
Example: =AVERAGE(A1:A10)
5. COUNT:
The COUNT formula counts the number of cells that contain numbers. It is used to determine the count of numeric values within a range.
Syntax: =COUNT(value1, [value2], ...)
Example: =COUNT(A1:A10)
6. SUMIF:
The SUMIF formula calculates the sum of a range of cells based on a specified condition. It allows you to sum values that meet a specific
criterion.
Syntax: =SUMIF(range, criteria, [sum_range])
Example: =SUMIF(A1:A10, ">50", B1:B10)
7. SUMIFS:
The SUMIFS formula calculates the sum of a range of cells based on multiple specified conditions. It allows you to sum values that meet
multiple criteria.
Syntax: =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Example: =SUMIFS(A1:A10, B1:B10, ">50", C1:C10, "Red")
8. AVERAGEIF:
The AVERAGEIF formula calculates the average of a range of cells based on a specified condition. It allows you to find the average value of
cells that meet a specific criterion.
Syntax: =AVERAGEIF(range, criteria, [average_range])
Example: =AVERAGEIF(A1:A10, ">50", B1:B10)
9. MINIFS:
The MINIFS formula returns the smallest value in a range of cells that meet a specified condition.
Syntax: =MINIFS(range, criteria, [min_range])
Example: =MINIFS(A1:A10, B1:B10, ">50")
10. MINIFS:
The MINIFS formula returns the smallest value in a range of cells based on multiple specified conditions.
Syntax: =MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Example: =MINIFS(A1:A10, B1:B10, ">50", C1:C10, "Red")
11. COUNTIF:
The COUNTIF formula counts the number of cells that meet a specified condition. It allows you to count cells that match a specific criterion.
Syntax: =COUNTIF(range, criteria)
Example: =COUNTIF(A1:A10, ">50")
12. COUNTIFS:
The COUNTIFS formula counts the number of cells that meet multiple specified conditions. It allows you to count cells that match multiple
criteria.
Syntax: =COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Example: =COUNTIFS(A1:A10, ">50", B1:B10, "Red")
13. MAXIFS:
The MAXIFS formula returns the largest value in a range of cells that meet a specified condition.
Syntax: =MAXIFS(range, criteria, [min_range])
Example: =MAXIFS(A1:A10, B1:B10, ">50")
14. MAXIFS:
The MAXIFS formula returns the largest value in a range of cells based on multiple specified conditions.
Syntax: =MAXIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Example: =MAXIFS(A1:A10, B1:B10, ">50", C1:C10, "Red")
15. COUNTA Formula:
The COUNTA formula is used to count the number of non-blank cells within a given range. It counts all cells that contain any type of data,
including text, numbers, logical values, errors, and empty strings. The basic syntax for the COUNTA formula is "=COUNTA(range)".
For example, if you have a range of cells A1 to A5 where A1, A2, and A4 contain data, and A3 and A5 are empty, the formula "=COUNTA(A1:A5)"
will return 3 as the result.
16. COUNTBLANK Formula:
The COUNTBLANK formula is used to count the number of blank cells within a given range. It counts cells that contain no data or empty strings.
The basic syntax for the COUNTBLANK formula is "=COUNTBLANK(range)".
For instance, if you have a range of cells A1 to A5 where A1, A3, and A5 are blank, and A2 and A4 contain data, the formula
"=COUNTBLANK(A1:A5)" will return 3 as the result.
Text Formulas.
1. TEXT:
The TEXT formula converts a numeric value to text using a specified format. It is used to format numbers, dates, and times as text.
Syntax: =TEXT(value, format_text)
Example: =TEXT(A1, "0.00")
2. UPPER:
The UPPER formula converts text to uppercase. It is useful for converting lowercase or mixed-case text to uppercase.
Syntax: =UPPER(text)
Example: =UPPER(A1)
3. LOWER:
The LOWER formula converts text to lowercase. It is useful for converting uppercase or mixed-case text to lowercase.
Syntax: =LOWER(text)
Example: =LOWER(A1)
4. PROPER:
The PROPER formula capitalizes the first letter of each word in a text string. It is commonly used for proper noun capitalization.
Syntax: =PROPER(text)
Example: =PROPER(A1)
5. LEFT:
The LEFT formula extracts a specified number of characters from the beginning of a text string.
Syntax: =LEFT(text, num_chars)
Example: =LEFT(A1, 5)
6. RIGHT:
The RIGHT formula extracts a specified number of characters from the end of a text string.
Syntax: =RIGHT(text, num_chars)
Example: =RIGHT(A1, 3)
7. MID:
The MID formula extracts a specified number of characters from a text string, starting at a specified position.
Syntax: =MID(text, start_num, num_chars)
Example: =MID(A1, 3, 5)
8. CHAR:
The CHAR formula returns the character specified by the ASCII value. It is used to get special characters based on their ASCII codes.
Syntax: =CHAR(number)
Example: =CHAR(65)
9. FIND:
The FIND formula searches for a specific text within another text and returns the starting position of the found text.
Syntax: =FIND(find_text, within_text, [start_num])
Example: =FIND("apple", A1)
10. SEARCH:
The SEARCH formula searches for a specific text within another text, similar to FIND, but it is not case-sensitive.
Syntax: =SEARCH(find_text, within_text, [start_num])
Example: =SEARCH("apple", A1)
11. REPLACE:
The REPLACE formula replaces a specific part of a text string with another text.
Syntax: =REPLACE(old_text, start_num, num_chars, new_text)
Example: =REPLACE(A1, 3, 2, "123")
12. SUBSTITUTE:
The SUBSTITUTE formula replaces specific instances of a text string within another text with a new text.
Syntax: =SUBSTITUTE(text, old_text, new_text, [instance_num])
Example: =SUBSTITUTE(A1, "apple", "banana")
13. CONCATENATE Formula:
The CONCATENATE formula is used to combine multiple text strings or cell values into a single string. It allows you to join different text values
or cell contents together. The basic syntax for the CONCATENATE formula is "=CONCATENATE(text1, text2, ...)".
For instance, if you have the text "Hello" in cell A1 and "World" in cell B1, the formula "=CONCATENATE(A1, " ", B1)" will result in "Hello
World".
14. TEXTJOIN:
The TEXTJOIN formula combines multiple text strings into a single text string, separated by a specified delimiter.
Syntax: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Example: =TEXTJOIN(", ", TRUE, A1:A5)
15. LEN Formula:
The LEN formula is used to calculate the length of a text string. It returns the number of characters in the text string, including spaces and
punctuation marks. The basic syntax for the LEN formula is "=LEN(text)".
For example, if you have the text "Hello" in cell A1, the formula "=LEN(A1)" will return 5 as the result.
16. REPT Formula:
The REPT formula is used to repeat a text string a specified number of times. It allows you to create a repeated string. The basic syntax for the
REPT formula is "=REPT(text, number_times)".
If you want to repeat the text "Hello" three times, you can use the formula "=REPT("Hello", 3)", and it will result in "HelloHelloHello".
17. TRIM Formula:
The TRIM formula is used to remove extra spaces from a text string, except for single spaces between words. It helps to clean up text by
removing leading, trailing, and excessive spaces. The basic syntax for the TRIM formula is "=TRIM(text)".
For instance, if you have the text " Hello World " in cell A1, the formula "=TRIM(A1)" will remove the extra spaces and return "Hello World".
Date and time
1. DATE:
The DATE formula creates a date by specifying the year, month, and day as separate arguments.
Syntax: =DATE(year, month, day)
Example: =DATE(2023, 5, 25)
2. TIME:
The TIME formula creates a time by specifying the hour, minute, and second as separate arguments.
Syntax: =TIME(hour, minute, second)
Example: =TIME(9, 30, 0)
3. DATEVALUE:
The DATEVALUE formula converts a date in text format to a serial number that Excel recognizes as a date.
Syntax: =DATEVALUE(date_text)
Example: =DATEVALUE("25-May-2023")
4. TIMEVALUE:
The TIMEVALUE formula converts a time in text format to a serial number that Excel recognizes as a time.
Syntax: =TIMEVALUE(time_text)
Example: =TIMEVALUE("09:30 AM")
5. HOUR:
The HOUR formula extracts the hour component from a specified time.
Syntax: =HOUR(time)
Example: =HOUR(A1)
6. MINUTE:
The MINUTE formula extracts the minute component from a specified time.
Syntax: =MINUTE(time)
Example: =MINUTE(A1)
7. SECOND:
The SECOND formula extracts the second component from a specified time.
Syntax: =SECOND(time)
Example: =SECOND(A1)
8. DAY:
The DAY formula extracts the day of the month from a specified date.
Syntax: =DAY(date)
Example: =DAY(A1)
9. MONTH:
The MONTH formula extracts the month from a specified date.
Syntax: =MONTH(date)
Example: =MONTH(A1)
10. YEAR:
The YEAR formula extracts the year from a specified date.
Syntax: =YEAR(date)
Example: =YEAR(A1)
11. DATEDIF:
The DATEDIF formula calculates the difference between two dates in various units (days, months, or years).
Syntax: =DATEDIF(start_date, end_date, unit)
Example: =DATEDIF(A1, A2, "d")
12. WORKDAYS:
The WORKDAYS formula calculates the number of working days between two dates, excluding weekends and optionally, specified holidays.
Syntax: =WORKDAYS(start_date, end_date, [holidays])
Example: =WORKDAYS(A1, A2, B1:B5)
13. NETWORKDAYS:
The NETWORKDAYS formula calculates the number of working days between two dates, excluding weekends and specified holidays.
Syntax: =NETWORKDAYS(start_date, end_date, [holidays])
Example: =NETWORKDAYS(A1, A2, B1:B5)
14. DAYS:
The DAYS formula calculates the number of days between two dates.
Syntax: =DAYS(end_date, start_date)
Example: =DAYS(A2, A1)
15. MONTHS:
The MONTHS formula calculates the number of months between two dates.
Syntax: =MONTHS(end_date, start_date)
Example: =MONTHS(A2, A1)
The EOMONTH formula in Excel is a useful function that allows you to determine the end of the month for a given date. It is particularly helpful
when working with financial or project planning, as it helps calculate due dates, end dates, or perform date-based calculations.
The syntax for the EOMONTH formula is as follows:
=EOMONTH(start_date, months)
Here's a breakdown of the components:
•
start_date: This is the initial date or the starting point from which you want to calculate the end of the month.
•
months: This represents the number of months to move forward or backward from the start_date. Positive values indicate future months,
while negative values indicate past months.
The EOMONTH formula returns the last day of the month that is the specified number of months away from the start_date.
16. TODAY Formula:
The TODAY formula is used to insert the current date into a cell. It automatically updates the date whenever the worksheet is recalculated or
opened. The basic syntax for the TODAY formula is "=TODAY()".
If you enter the formula "=TODAY()" in a cell, it will display the current date.
17. NOW Formula:
The NOW formula is used to insert the current date and time into a cell. It automatically updates the date and time whenever the worksheet
is recalculated or opened. The basic syntax for the NOW formula is "=NOW()".
If you enter the formula "=NOW()" in a cell, it will display the current date and time.
18. EDATE Formula:
The EDATE formula is used to calculate a date that is a specified number of months before or after a given date. It is useful for performing
date-based calculations. The basic syntax for the EDATE formula is "=EDATE(start_date, months)".
For example, if you have a start date in cell A1 and you want to add 6 months to it, you can use the formula "=EDATE(A1, 6)", and it will return
the date that is 6 months after the start date.
Other Formulas
1. ISTEXT Formula:
The ISTEXT formula is used to check whether a cell contains text or not. It returns TRUE if the cell contains text and FALSE if it contains any
other data type. The basic syntax for the ISTEXT formula is "=ISTEXT(value)".
For example, if you want to check if cell A1 contains text, you can use the formula "=ISTEXT(A1)". If A1 contains text, the formula will return
TRUE; otherwise, it will return FALSE.
2. ISNUMBER Formula:
The ISNUMBER formula is used to check whether a cell contains a numeric value or not. It returns TRUE if the cell contains a number and
FALSE if it contains any other data type. The basic syntax for the ISNUMBER formula is "=ISNUMBER(value)".
For instance, if you want to check if cell A1 contains a number, you can use the formula "=ISNUMBER(A1)". If A1 contains a number, the
formula will return TRUE; otherwise, it will return FALSE.
3. ISBLANK Formula:
The ISBLANK formula is used to check whether a cell is blank or not. It returns TRUE if the cell is empty or contains no data and FALSE if it
contains any type of data. The basic syntax for the ISBLANK formula is "=ISBLANK(value)".
For example, if you want to check if cell A1 is blank, you can use the formula "=ISBLANK(A1)". If A1 is blank, the formula will return TRUE;
otherwise, it will return FALSE.
4. ROW Formula:
The ROW formula is used to return the row number of a cell reference. It returns the row number of the cell in which the formula is entered.
The basic syntax for the ROW formula is "=ROW([reference])".
If you enter the formula "=ROW(A1)" in cell B1, it will return 1 since it is the row number of cell A1.
5. COLUMN Formula:
The COLUMN formula is used to return the column number of a cell reference. It returns the column number of the cell in which the formula
is entered. The basic syntax for the COLUMN formula is "=COLUMN([reference])".
If you enter the formula "=COLUMN(A1)" in cell B1, it will return 1 since it is the column number of cell A1.
6. ROWS Formula:
The ROWS formula is used to count the number of rows in a range or array. It returns the total number of rows covered by the given range or
array. The basic syntax for the ROWS formula is "=ROWS(range)".
For example, if you have a range of cells A1 to A5, the formula "=ROWS(A1:A5)" will return 5 as the result, indicating the total number of rows
in the range.
7. COLUMNS Formula:
The COLUMNS formula is used to count the number of columns in a range or array. It returns the total number of columns covered by the
given range or array. The basic syntax for the COLUMNS formula is "=COLUMNS(range)".
If you have a range of cells A1 to D1, the formula "=COLUMNS(A1:D1)" will return 4 as the result, indicating the total number of columns in
the range.
8. MATCH:
The MATCH formula searches for a specified value in a range of cells and returns its relative position.
Syntax: =MATCH(lookup_value, lookup_array, [match_type])
Example: =MATCH(A1, A1:A10, 0)