Like this document? Why not share!

# Huge Collection Of Formulae

## by paseshasaayee on Sep 08, 2011

• 228 views

### Views

Total Views
228
Views on SlideShare
228
Embed Views
0

Likes
0
0
0

No embeds

## Huge Collection Of FormulaeDocument Transcript

• Excel FormulasPURNA CHANDRA RA
• NDRA RAO P
• Text 1 10 Text 1 Text 2 20 Text 2 To get the LAST text value in a list Text 3 30 Text 3 Text 4 40 Text 4 1 Text 15 =LOOKUP(REPT("z",255),A:A) Text 5 50 Text 5 Text 6 60 60 Use of REPT function Text 7 70 70 REPT("z",255) -> A string consisting of 255 "z"s is considered the largest strin Text 8 80 80 Text 9 90 90 To get the LAST numeric value in a listText 10 100 100Text 11 110 Text 11 2 150 =LOOKUP(9.99999999999E+307,B:B)Text 12 120 Text 12Text 13 130 Text 13 9.9999999999999e+307 is the largest number that you can enter in ExcelText 14 140 Text 14Text 15 150 Text 15 To get the LAST value in a list If a list contains both alpha and numeric values 3 Text 15 =INDEX(C:C,MAX(MATCH("zzzzzzzzzz",C:C),MATCH(9.9999E+307,C MATCH("zzzzzzzzzz",C:C) -> returns the position of last text value MATCH(9.9999E+307,C:C) -> returns the position of the last nume now using MAX we will get the maximum value Now to get the last value we used INDEX function. The 3rd formula would error out if the list contains either text or nu In this case the following would work irrespective of all kind of valu =INDEX(B:B,LOOKUP(9.999E+307,CHOOSE({1,2,3},MATCH("zzzzz 4 Err:502 99E+307,B:B),MAX(MATCH("zzzzzzz",B:B),MATCH(9.9999E+307,B: CHOOSE returns array of values 1 15 =MATCH("zzzzzzz",B:B) 2 15 =MATCH(9.99999999999E+307,B:B) 3 15 =MAX(MATCH("zzzzzzz",C:C),MATCH(9.9999E+307,B:B 4 #N/A =LOOKUP(9.9999E+307,CHOOSE({1,2,3},#N/A,15,#N/ Now LOOKUP returns the last numeric value, i.e 15.
• 5 "z"s is considered the largest string Excel can handle.mber that you can enter in Excel zzzzzz",C:C),MATCH(9.9999E+307,C:C))) urns the position of last text value eturns the position of the last numeric valuemaximum value ed INDEX function. t if the list contains either text or numeric values only. work irrespective of all kind of values307,CHOOSE({1,2,3},MATCH("zzzzzzz",B:B),MATCH(9.99zzzzz",B:B),MATCH(9.9999E+307,B:B))))) 9999E+307,B:B) zz",C:C),MATCH(9.9999E+307,B:B)) 307,CHOOSE({1,2,3},#N/A,15,#N/A)) umeric value, i.e 15.
• Name Value Match Figure 2500Tom 2700 Err:504Kris 2300Alan 2000Dan 2250Bob 2100 Break MIN(ABS(E1-B2:B6)) 200 =MIN(ABS(\$E\$1-B2)) 200 =MIN(ABS(\$E\$1-B3)) 500 =MIN(ABS(\$E\$1-B4)) 250 =MIN(ABS(\$E\$1-B5)) 400 =MIN(ABS(\$E\$1-B6)) 200 =MIN(D9:D13) Break ABS(E1-B2:B6) 200 =ABS(\$E\$1-B2) 200 =ABS(\$E\$1-B3) 500 =ABS(\$E\$1-B4) 250 =ABS(\$E\$1-B5) 400 =ABS(\$E\$1-B6) 200 =MIN(D17:D21) Now MATCH(MIN(ABS(E1-B2:B6)),ABS(E1-B2:B6),0) Err:504 =MATCH(200,{200,200,500,250,400},0) Tom =INDEX(A2:A6,1) Since we are looking for an exact match, MATCH returns the first name Tom though Tom and
• name Tom though Tom and Kris got same values.
• field 1a30 a100021a31 a100022a32 a100023a33 a100024a34 a100025a35 a100026a36 a100027a37 a100028a38 a100029a39 a100030 Err:504 =VLOOKUP(INDEX(A2:A32,MATCH(1,SUBTOTAL(3,OFFSET(A2:A32,ROW(A2:A32)-ROW(A2),, Table =Sheet1!\$D\$39:\$E\$42 a10 a a20 b a30 c a40 d if we break OFFSET(A2:A32,ROW(A2:A32)-ROW(A2),,1) we would get the following {"a10";"a11";"a12";"a13";"a14";"a15";"a16";"a17";"a18";"a19";"a20";"a21";"a22";"a23";"a24";"a25";"a2 29";"a30";"a31";"a32";"a33";"a34";"a35";"a36";"a37";"a38";"a39";"a40"} now incorporating the above within SUBTOTAL(3,OFFSET(A2:A32,ROW(A2:A32)-ROW(A2),,1)), the resu {0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;0} now MATCH(1,{0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;1;1;1;1;1;1;1;1;0},0) yields 21 now INDEX(A2:A32,21) returns "a30" VLOOKUP("a30",Table,2,0) returns c
• 2,ROW(A2:A32)-ROW(A2),,1)),0)),Table,2,0)a22";"a23";"a24";"a25";"a26";"a27";"a28";"a32)-ROW(A2),,1)), the result would be;0},0) yields 21
• You can make custom message in a cell where you can define two conditionsif the condition for B10 is <100 "Not OK", >=100, "OK" OK 102 OKIf you need the cell to show the value as well as the message;see B13Custom format the cell as[<100]# "Not OK";[>=100]# "OK";General
• SumThis 10SumThis 20 30 =SUM(SUMIF(INDIRECT({"a2:a3","a12:a14","a18","a22:a23"}),"sumthis",INDIRECT({"bCountThis 30 4 =SUM(COUNTIF(INDIRECT({"a4:a7","a15:a17","a21","a24:a25"}),"countthis"))CountThis 40CountThis 50CountThis 60SumThis 70SumThis 80CountThis 90CountThis 100SumThis 110SumThis 120SumThis 130CountThis 140CountThis 150CountThis 160SumThis 170SumThis 180CountThis 190CountThis 200SumThis 210SumThis 220CountThis 230CountThis 240
• 22:a23"}),"sumthis",INDIRECT({"b2:b3","b12:b14","b18","b22:b23"}))) "a24:a25"}),"countthis"))
• Name OversMcGrath 10.0Brett Lee 9.4Shane Warne 10.0Stuart Clark 8.0Gillespie 7.0Symonds 5.2 50.0 =DOLLARFR(DOLLARDE(SUM(B4:B9),6),6)if months recorded as ; adding 1 yearJan 0.01 1.01Feb 0.02 1.02Mar 0.03 1.03 1.09 yearsApr 0.04 1.04 1.10 yearsMay 0.05 1.05 3.07 yearsJun 0.06 1.06Jul 0.07 1.07 =DOLLARFR(DOLLARDE(SUM(E19:E20),12),12)Aug 0.08 1.08Sep 0.09 1.09Oct 0.10 1.10Nov 0.11 1.11Dec 0.12 1.12