Excel Formulas - 2
Excel Formulas - 2
=SUMPRODUCT(SUBTOTAL(9,OFFSET(B2,ROW(B2:B20)-ROW(B2),))*(B2:B20>14))
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.
© eforexcel.com Page 7 of 38
Excel Formulas Bible
=INT(A1)
=TRUNC(A1)
=INT(A1)*SIGN(A1) OR =TRUNC(A1)*SIGN(A1)
=INT(ABS(A1)) OR =TRUNC(ABS(A1))
=ABS(INT(A1)) OR = ABS(TRUNC(A1))
=MOD(ABS(A1),1)
=ABS(A1)-INT(ABS(A1))
=DATE(YEAR(A1),MONTH(A1),1)
=A1-DAY(A1)+1
=EOMONTH(A1,-1)+1
© eforexcel.com Page 8 of 38
Excel Formulas Bible
=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"ddd")="Mon"))
“Mon” can be replaced with any other day of the week as per need.
=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.
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)
© eforexcel.com Page 9 of 38
Excel Formulas Bible
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)
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)
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)
=CELL("filename",$A$1)
=REPLACE(LEFT(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))-
1),1,FIND("[",CELL("filename",$A$1)),"")
=REPLACE(CELL("filename",A1),1,FIND("]",CELL("filename",A1)),"")
Make sure that A1 is used in the formula. If it is not used, it will extract sheet name for the
last active sheet which may not be one which we want.
If you want the sheet name for last active sheet only, then formula would become
=REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),"")
If your workbook is located in say C:\Excel\MyDocs, the formula to retrieve the directory
for this would be
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1))-2)
=EOMONTH(A1,0)
=DATE(YEAR(A1),MONTH(A1)+1,0)
© eforexcel.com Page 11 of 38