Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Fórmulas indispensables de excel, Apuntes de Competencias en MS Microsoft Excel

Fórmulas útiles para el manejo de excel

Tipo: Apuntes

2017/2018

Subido el 03/05/2023

usuario desconocido
usuario desconocido 🇲🇽

1 documento

1 / 42

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
EXCEL
Formulas Bible
Excel 2013 / 2016
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Vista previa parcial del texto

¡Descarga Fórmulas indispensables de excel y más Apuntes en PDF de Competencias en MS Microsoft Excel solo en Docsity!

Table ofTable ofTable ofTable of ContentsContentsContentsContents

  • Excel 2013 /
    1. SUM of Digits when cell Contains all Numbers ......................................................................................
    1. SUM of Digits when cell Contains Numbers and non Numbers both ..........................................
    1. A List is Unique or Not (Whether it has duplicates) ...........................................................................
    1. Count No. of Unique Values
    1. Count No. of Unique Values Conditionally ...............................................................................................
    1. Add Month to or Subtract Month from a Given Date ..........................................................................
    1. Add Year to or Subtract Year from a Given Date...................................................................................
    1. Convert a Number to a Month Name ..........................................................................................................
    1. Converting Date to a Calendar Quarter .....................................................................................................
    1. Converting Date to a Indian Financial Year Quarter ......................................................................
    1. Calculate Age from Given Birthday .........................................................................................................
    1. Number to Date Format Conversion ......................................................................................................
    1. Number to Time Format Conversion .....................................................................................................
    1. Count Cells Starting (or Ending) with a particular String............................................................
    1. Count No. of Cells Having Numbers Only .............................................................................................
    1. Count No. of Cells which are containing only Characters ............................................................
    1. Number of Characters in a String without considering blanks .................................................
    1. Number of times a character appears in a string .............................................................................
    1. Count Non Numbers in a String ................................................................................................................
    1. Count Numbers in a String ..........................................................................................................................
    1. Count only Alphabets in a String..............................................................................................................
    1. Most Frequently Occurring Value in a Range ....................................................................................
    1. COUNTIF on Filtered List .............................................................................................................................
    1. SUMIF on Filtered List...................................................................................................................................
    1. Extract First Name from Full Name ........................................................................................................
    1. Extract Last Name from Full Name .........................................................................................................
    1. Extract the Initial of Middle Name ..........................................................................................................
    1. Extract Middle Name from Full Name ...................................................................................................
    1. Remove Middle Name in Full Name .......................................................................................................
    1. Extract Integer and Decimal Portion of a Number ..........................................................................
    1. First Day of the Month for a Given Date ...............................................................................................
    1. How Many Mondays or any other Day of the Week between 2 Dates ...................................
    1. Maximum Times a Particular Entry Appears Consecutively ......................................................
    1. Find the Next Week of the Day..................................................................................................................
    1. Find the Previous Week of the Day
    1. Get File Name through Formula
    1. Get Workbook Name through Formula
    1. Get Sheet Name through Formula
    1. Get Workbook's Directory from Formula
    1. Last Day of the Month for a Given Date
    1. Perform Multi Column VLOOKUP
    1. VLOOKUP from Right to Left
    1. Case Sensitive VLOOKUP
    1. Rank within the Groups
    1. Remove Alphabets from a String
    1. Remove numbers from string.................................................................................................................
    1. Roman Representation of Numbers
    1. Sum Bottom N Values in a Range
    1. Sum Every Nth Row.....................................................................................................................................
    1. We have AVERAGEIF. What about MEDIANIF and MODEIF?
    1. Number of Days in a Month
    1. How to Know if a Year is a Leap Year
    1. Last Working Day of the Month If a Date is Given
    1. First Working Day of the Month if a Date is Given
    1. Date for Nth Day of the Year
    1. Calculate Geometric Mean by Ignoring 0 and Negative Values
    1. Financial Function - Calculate EMI.......................................................................................................
    1. Financial Function - Calculate Interest Part of an EMI
    1. Financial Function - Calculate Principal Part of an EMI
    1. Financial Function - Calculate Number of EMIs to Pay Up a Loan
    1. Financial Function - Calculate Interest Rate
    1. Financial Function – Calculate Compounded Interest
    1. Financial Function – Calculate Effective Interest
    1. Abbreviate Given Names...........................................................................................................................
    1. Get Column Name for a Column Number
    1. Get Column Range for a Column Number
    1. Find the nth Largest Number when there are duplicates
    1. Extract Date and Time from Date Timestamp
    1. Convert a Number into Years and Months
    1. COUNTIF for non-contiguous range
    1. Count the Number of Words in a Cell / Range
    1. Numerology Sum of the Digits aka Sum the Digits till the result is a single digit..........
    1. Generate Sequential Numbers and Repeat them
    1. Repeat a Number and Increment and Repeat....
    1. Generate Non Repeating Random Numbers through Formula
    1. Financial Year Formula (e.g. 2015-16 or FY16)
    1. First Working Day of the Year
    1. Last Working Day of the Year
    1. Convert from Excel Date (Gregorian Date) to Julian Date
    1. Convert from Julian Dates to Excel (Gregorian) Dates
    1. Extract User Name from an E Mail ID
    1. Extract Domain Name from an E Mail ID
    1. Location of First Number in a String
    1. Location of Last Number in a String
    1. Find the Value of First Non Blank Cell in a Range.........................................................................
    1. Find First Numeric Value in a Range
    1. Find Last Numeric Value in a Range
    1. Find First non Numeric Value in a Range
    1. Find Last non Numeric Value in a Range
    1. Find Last Used Value in a Range
    1. MAXIF
    1. MINIF
    1. Generate a Unique List out of Duplicate Entries

1. SUM of Digits when cell Contains all Numbers

If you cell contains only numbers like A1:= 7654045, then following formula can be used to find sum of digits

=SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))

2. SUM of Digits when cell Contains Numbers and non

Numbers both

If you cell contains non numbers apart from numbers like A1:= 76$5a4b045%d, then following formula can be used to find sum of digits

=SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,ROW(1:9),"")))*ROW(1:9))

The above formula can be used even if contains all numbers as well.

3. A List is Unique or Not (Whether it has duplicates)

Assuming, your list is in A1 to A1000. Use following formula to know if list is unique.

=MAX(FREQUENCY(A1:A1000,A1:A1000))

=MAX(INDEX(COUNTIF(A1:A1000,A1:A1000),,))

If answer is 1, then it is Unique. If answer is more than 1, it is not unique.

4. Count No. of Unique Values

Use following formula to count no. of unique values -

=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&""))

5. Count No. of Unique Values Conditionally

If you have data like below and you want to find the unique count for Region = “A”, then you can use below Array formula –

=SUM(IF(FREQUENCY(IF(A2:A20<>"",IF(A2:A20="A",MATCH(B2:B20,B2:B20,0))),ROW(A 2:A20)-ROW(A2)+1),1))

If you have more number of conditions, the same can be built after A2:A20 = “A”.

Note - Array Formula is not entered by pressing ENTER after entering your formula but by pressing CTRL+SHIFT+ENTER. If you are copying and pasting this formula, take F2 after pasting and CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again. Don't put { } manually.

If you want to subtract Years from a given date, formulas would be -

=EDATE(A1,-12*B1)

=DATE(YEAR(A1)-B1,MONTH(A1),DAY(A1))

8. Convert a Number to a Month Name

Use below formula to generate named 3 lettered month like Jan, Feb....Dec

=TEXT(A1*30,"mmm")

Replace "mmm" with "mmmm" to generate full name of the month like January, February....December in any of the formulas in this post.

9. Converting Date to a Calendar Quarter

Assuming date is in Cell A1. You want to convert it into a quarter (1, 2, 3 & 4). Jan to Mar is 1, Apr to Jun is 2, Jul to Sep is 3 and Oct to Dec is 4.

=CEILING(MONTH(A1)/3,1)

OR

= ROUNDUP(MONTH(A1)/3,0)

OR

=CHOOSE(MONTH(A1),1,1,1,2,2,2,3,3,3, 4,4,4)

10. Converting Date to a Indian Financial Year Quarter

Assuming date is in Cell A1. You want to convert it into a Indian Financial Year Quarter. Jan to Mar is 4, Apr to Jun is 1, Jul to Sep is 2 and Oct to Dec is 3.

=CEILING(MONTH(A1)/3,1)+IF(MONTH(A1)<=3,3,-1)

OR

=ROUNDUP(MONTH(A1)/3,0)+IF(MONTH(A1)<=3,3,-1)

OR

=CHOOSE(MONTH(A1),4,4,4,1,1,1,2,2,2,3,3,3)

11. Calculate Age from Given Birthday

=DATEDIF(A1,TODAY(),"y")&" Years "&DATEDIF(A1,TODAY(),"ym")&" Months "&DATEDIF(A1,TODAY(),"md")&" Days"

12. Number to Date Format Conversion

If you have numbers like 010216 and you want to convert this to date format, then the following formula can be used

=--TEXT(A1,"00/00/00") for 2 digits year

Note – Minimum 5 digits are needed for above formula to work

If you have numbers like 01022016 and you want to convert this to date format, then the following formula can be used

=--TEXT(A1,"00/00/0000") for 4 digits year

Note – Minimum 7 digits are needed for above formula to work

13. Number to Time Format Conversion

If you have numbers like 1215 and you want to convert this to hh:mm format, then the following formula can be used

=--TEXT(A1,"00:00")

Note – Minimum 3 digits are needed for above formula to work

To convert to hh:mm:ss format

=--TEXT(A1,"00:00:00")

Note – Minimum 5 digits are needed for above formula to work

14. Count Cells Starting (or Ending) with a particular

String

  1. Say you want to count all cells starting with C

=COUNTIF(A1:A10,"c*")

c* is case insensitive. Hence, it will count cells starting with both c or C.

Suppose you want to find all cells starting with Excel.

=COUNTIF(A1:A10,"excel*")

=IF(LEN(TRIM(A1))=0,0,SUMPRODUCT(--NOT(ISNUMBER((--

MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))))

20. Count Numbers in a String

Suppose you have a string "abc123def43cd" and you want to count numbers in this.

If your string is in A1, use following formula -

=SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,ROW(1:10)-1,"")))

OR

=SUMPRODUCT(--ISNUMBER((--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))

21. Count only Alphabets in a String

Suppose you have a string "Ab?gh123def%h*" and you want to count only Aphabets.

Suppose your string is in A1, put following formula for this.

=SUMPRODUCT(LEN(A1)- LEN(SUBSTITUTE(UPPER(A1),CHAR(ROW(INDIRECT("65:90"))),"")))

OR

=SUMPRODUCT(--(ABS(77.5-

CODE(MID(UPPER(A1),ROW(INDIRECT("A1:A"&LEN(A1))),1)))<13))

22. Most Frequently Occurring Value in a Range

Assuming, your range is A1:A10, enter the below formula as Array Formula i.e. not by pressing ENTER after entering your formula but by pressing CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again. Don't put { } manually.

=INDEX(A1:A10,MATCH(MAX(COUNTIF(A1:A10,A1:A10)),COUNTIF(A1:A10,A1:A10),0))

The non-Array version of above formula

=INDEX(A1:A10,MATCH(MAX(INDEX(COUNTIF(A1:A10,A1:A10),,)),INDEX(COUNTIF(A1:

A10,A1:A10),,),0))

23. COUNTIF on Filtered List

You can use SUBTOTAL to perform COUNT on a filtered list but COUNTIF can not be done on a filtered list. Below formula can be used to perform COUNTIF on a filtered list

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2,ROW(B2:B20)-ROW(B2),))*(B2:B20>14))

Here B2:B20>14 is like a criterion in COUNTIF (=COUNTIF(B2:B20,">14"))

24. SUMIF on Filtered List

You can use SUBTOTAL to perform SUM on a filtered list but SUMIF can not be done on a filtered list. Below formula can be used to perform SUMIF on a filtered list

=SUMPRODUCT(SUBTOTAL(9,OFFSET(B2,ROW(B2:B20)-ROW(B2),))*(B2:B20>14))

Here B2:B20>14 is like a criterion in SUMIF.

25. Extract First Name from Full Name

=LEFT(A1,FIND(" ",A1&" ")-1)

26. Extract Last Name from Full Name

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1)))

27. Extract the Initial of Middle Name

Suppose, you have a name John Doe Smith and you want to show D as middle initial. Assuming, your data is in A1, you may use following formula

=IF(COUNTIF(A1,"* * *"),MID(A1,FIND(" ",A1)+1,1),"")

If name is of 2 or 1 words, the result will be blank. This works on 3 words name only as middle can be decided only for 3 words name.

28. Extract Middle Name from Full Name

=IF(COUNTIF(A1,"* * *"),MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-(FIND("

",A1)+1)),"")

=IF(COUNTIF(A1,"* * *"),TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1)),2),FIND("

",A1)+1,LEN(A1))),"")

=IF(COUNTIF(A1,"* * *"),LEFT(REPLACE(A1,1,FIND(" ",A1),""),FIND("

",REPLACE(A1,1,FIND(" ",A1),""))-1))

29. Remove Middle Name in Full Name

=IF(COUNTIF(A1,"* * *"),LEFT(A1,FIND(" ",A1&" "))&TRIM(RIGHT(SUBSTITUTE(A1,"

",REPT(" ",LEN(A1))),LEN(A1))),"")

=IF(COUNTIF(A1,"* * *"),REPLACE(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND("

",A1),""),"")

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"ddd")="Mon"))

“Mon” can be replaced with any other day of the week as per need.

33. Maximum Times a Particular Entry Appears

Consecutively

Suppose, we want to count maximum times “A” appears consecutively, you may use following Array formula -

=MAX(FREQUENCY(IF(A2:A20="A",ROW(A2:A20)),IF(A2:A20<>"A",ROW(A2:A20))))

Note - Array Formula is not entered by pressing ENTER after entering your formula but by pressing CTRL+SHIFT+ENTER. If you are copying and pasting this formula, take F2 after pasting and CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again. Don't put { } manually.

34. Find the Next Week of the Day

There are 2 scenarios in this case. For example, if today’s date is 2-Jan-17 (Monday) and I try to find the next Monday, I can get either 2-Jan-17 or 9-Jan-17 as per need. For Tuesday to Sunday, it is not a problem as they come after 2-Jan-17 only.

Case 1 - If the Day falls on the same date, then that very date (Hence, in case of 2-Jan- 17, next Monday would be 2-Jan-17 only)

Next Mon =CEILING($A$1-2,7)+ Next Tue =CEILING($A$1-3,7)+ Next Wed =CEILING($A$1-4,7)+

Next Thu =CEILING($A$1-5,7)+ Next Fri =CEILING($A$1-6,7)+ Next Sat =CEILING($A$1-7,7)+ Next Sun =CEILING($A$1-8,7)+

Case 2 - If the Day falls on the same date, then next date (Hence, in case of 2-Jan-17, next Monday would be 9-Jan-17 only)

Next Mon =CEILING($A$1-1,7)+ Next Tue =CEILING($A$1-2,7)+ Next Wed =CEILING($A$1-3,7)+ Next Thu =CEILING($A$1-4,7)+ Next Fri =CEILING($A$1-5,7)+ Next Sat =CEILING($A$1-6,7)+ Next Sun =CEILING($A$1-7,7)+

35. Find the Previous Week of the Day

There are 2 scenarios in this case. For example, if today’s date is 2-Jan-17 (Monday) and I try to find the previous Monday, I can get either 2-Jan-17 or 26-Dec-16 as per need. For Tuesday to Sunday, it is not a problem as they come prior to 2-Jan-17 only.

Case 1 - If the Day falls on the same date, then that very date (Hence, in case of 2-Jan- 17, previous Monday would be 2-Jan-17 only)

Previous Mon =CEILING($A$1-8,7)+ Previous Tue =CEILING($A$1-9,7)+ Previous Wed =CEILING($A$1-10,7)+ Previous Thu =CEILING($A$1-11,7)+ Previous Fri =CEILING($A$1-12,7)+ Previous Sat =CEILING($A$1-13,7)+ Previous Sun =CEILING($A$1-14,7)+

Case 2 - If the Day falls on the same date, then previous date (Hence, in case of 2-Jan- 17, previous Monday would be 26-Dec-16 only)

Previous Mon =CEILING($A$1-9,7)+ Previous Tue =CEILING($A$1-10,7)+ Previous Wed =CEILING($A$1-11,7)+ Previous Thu =CEILING($A$1-12,7)+ Previous Fri =CEILING($A$1-13,7)+ Previous Sat =CEILING($A$1-14,7)+ Previous Sun =CEILING($A$1-15,7)+

36. Get File Name through Formula

Before getting this, make sure that you file has been saved at least once as this formula is dependent upon the file path name which can be pulled out by CELL function only if file has been saved at least once.

=DATE(YEAR(A1),MONTH(A1)+1,1)-

41. Perform Multi Column VLOOKUP

You know VLOOKUP, one of the most loved function of Excel. The syntax is VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

Here look_value can be a single value not multiple values.

Now, you are having a situation where you want to do vlookup with more than 1 values. For the purpose of illustrating the concept, let's say we have 2 values to be looked up.

Below is your lookup table and you want to look up for Emp - H and Gender - F for Age.

=INDEX(C2:C12,MATCH(1,INDEX(--((A2:A12=F2)(B2:B12=G2)(ROW(A2:A12)-

ROW(A2)+1)<>0),,),0))

Concatenation Approach

=INDEX(C2:C10,MATCH(F2&"@@@"&G2,INDEX(A2:A10&"@@@"&B2:B10,,),0)) @@@ can be replaced by any characters which should not be part of those columns.

By concatenation, you can have as many columns as possible.

CAUTION - Result of entire concatenation should not be having length more than 255. Hence, F2&"@@@"&G2 should not have more than 255 characters.

Another alternative is to use below Array formula -

=INDEX(C2:C12,MATCH(1,--NOT(ISLOGICAL(IF(A2:A12=F2,IF(B2:B12=G2,C2:C12)))),0))

Note - Array Formula is not entered by pressing ENTER after entering your formula but by pressing CTRL+SHIFT+ENTER. If you are copying and pasting this formula, take F2 after pasting and CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again. Don't put { } manually.

42. VLOOKUP from Right to Left

VLOOKUP always looks up from Left to Right. Hence, in the below table, I can find Date of Birth of Naomi by giving following formula –

=VLOOKUP("Naomi",B:D,3,0)

But, If I have to find Emp ID corresponding to Naomi, I can not do it through VLOOKUP formula. To perform VLOOKUP from Right to Left, you will have to use INDEX / MATCH combination. Hence, you will have to use following formula –

=INDEX(A:A,MATCH("Naomi",B:B,0))

43. Case Sensitive VLOOKUP

Suppose your have data like below table and you want to do a case sensitive VLOOKUP

If perform a regular VLOOKUP on SARA, I would get the answer 4300. But in a case sensitive VLOOKUP, answer should be 3200. You may use below formula for Case Sensitive VLOOKUP

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(

SUBSTITUTE(LOWER(A1),"a",""),"b",""),"c",""),"d",""),"e",""),"f",""), "g",""),"h",""),"i",""),"j",""),"k",""),"l",""),"m",""),"n",""),"o",""), "p",""),"q",""),"r",""),"s",""),"t",""),"u",""),"v",""),"w",""),"x",""),"y",""),"z","")

46. Remove numbers from string

To remove numbers from a string (for example Vij1aY A. V4er7ma8 contains numbers which are not required), we can use nested SUBSTITUTE function to remove numbers. Use below formula assuming string is in A1 cell -

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( A1,1,""),2,""),3,""),4,""),5,""),6,""),7,""),8,""),9,""),0,"")

Note - Since this formula is in multiple lines, hence you will have to copy this in Formula Bar. If you copy this formula in a cell, it will copy this in three rows.

47. Roman Representation of Numbers

Use ROMAN function.

Hence ROMAN(56) will give LVI.

ROMAN works only for numbers 1 to 3999.

48. Sum Bottom N Values in a Range

Suppose you have numbers in range A1:A100 and you want to sum up bottom N values

=SUMPRODUCT(SMALL($A$1:$A$100,ROW(1:10)))

In case, you want to ignore 0 values (and blanks)

=SUMPRODUCT(SMALL(IF($A$1:$A$100<>0,$A$1:$A$100),ROW(1:10)))

Both the above formulas will function only if there are at least N values as per ROW(1:N). Hence, for above formulas, it would work only if there are at least 10 numbers in A1 to A100.

To overcome this limitation -

Enter the below formulas as Array Formula

=SUM(IFERROR(SMALL($A$1:$A$100,ROW(1:10)),0))

=SUM(IFERROR(SMALL(IF($A$1:$A$100<>0,$A$1:$A$100),ROW(1:10)),0))

Non Array Versions of above formulas (For Excel 2010 and above)

=SUMPRODUCT(AGGREGATE(15,6,$A$1:$A$100,ROW(1:10)))

=SUMPRODUCT(AGGREGATE(15,6,$A$1:$A$100/($A$1:$A$100<>0),ROW(1:10)))

49. Sum Every Nth Row

If your numbers are in range A1:A100, use below formula

=SUMPRODUCT((A1:A100)*(MOD(ROW(A1:A100)-ROW(A1)+1,2)=0))

Above formula is for every 2nd row. Replace 2 with N. Hence, for every 5th row -

=SUMPRODUCT((A1:A100)*(MOD(ROW(A1:A100)-ROW(A1)+1,5)=0))

This is a generic formula and will work for any range. If you range is B7:B50, your formula would become

=SUMPRODUCT((B7:B50)*(MOD(ROW(B7:B50)-ROW(B7)+1,2)=0))

50. We have AVERAGEIF. What about MEDIANIF and

MODEIF?

Excel doesn't provide MEDIANIF and MODEIF. You will have to use Array formulas to achieve these functionality. Let's assume that our data is like below –

To calculate MEDIANIF and MODEIF, enter below formulas i.e. not by pressing ENTER after entering your formula but by pressing CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again. Don't put { } manually.