


































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Encuentra los documentos específicos para los exámenes de tu universidad
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
Fórmulas útiles para el manejo de excel
Tipo: Apuntes
Subido el 03/05/2023
1 documento
1 / 42
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!



































If you cell contains only numbers like A1:= 7654045, then following formula can be used to find sum of digits
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.
Assuming, your list is in A1 to A1000. Use following formula to know if list is unique.
If answer is 1, then it is Unique. If answer is more than 1, it is not unique.
Use following formula to count no. of unique values -
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 -
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.
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)
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.
=DATEDIF(A1,TODAY(),"y")&" Years "&DATEDIF(A1,TODAY(),"ym")&" Months "&DATEDIF(A1,TODAY(),"md")&" Days"
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
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
Note – Minimum 5 digits are needed for above formula to work
=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*")
Suppose you have a string "abc123def43cd" and you want to count numbers in this.
If your string is in A1, use following formula -
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
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.
The non-Array version of above formula
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"))
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
Here B2:B20>14 is like a criterion in SUMIF.
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 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.
=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"ddd")="Mon"))
“Mon” can be replaced with any other day of the week as per need.
Suppose, we want to count maximum times “A” appears consecutively, you may use following Array formula -
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.
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)+
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)+
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.
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.
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 -
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.
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))
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(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","")
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.
Use ROMAN function.
Hence ROMAN(56) will give LVI.
ROMAN works only for numbers 1 to 3999.
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)
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))
Non Array Versions of above formulas (For Excel 2010 and above)
If your numbers are in range A1:A100, use below formula
Above formula is for every 2nd row. Replace 2 with N. Hence, for every 5th row -
This is a generic formula and will work for any range. If you range is B7:B50, your formula would become
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.