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
BudgetedCost Heads Jan Feb Mar Apr May Jun Jul AugCost Head #1 4324 93473 23212 95667 73473 2781 40805 67103Cost Head #2 49586 6278 76559 10698 86827 52489 23201 82211Cost Head #3 25295 23022 24764 30558 36055 23979 28623 34349Cost Head #4 71438 16157 947 29634 65316 95415 536 85656Cost Head #5 97194 70894 77817 66071 10949 57229 71861 72385ActualCost Heads Jan Feb Mar Apr May Jun Jul AugCost Head #1 4824 93973 22712 96417 72723Cost Head #2 49086 7028 75809 10198 87327Cost Head #3 24545 22272 25264 31058 36805Cost Head #4 71938 15657 447 28884 64816Cost Head #5 97944 71394 78567 66571 10449Current Month Sep =TEXT(TODAY(),"mmm") Budgted Actual Cost Heads (YTD) (YTD)Cost Head #1 Err:508 290649Cost Head #2 Err:508 229448Cost Head #3 Err:508 139944Cost Head #4 Err:508 181742Cost Head #5 Err:508 324925 Formula in B19 and copied down =SUM(B3:INDEX(B3:M3,MATCH($B$17,$B$2:$M$2,0))) Formula in C19 and copied down =SUM(B11:M11)
Sep Oct Nov Dec41301 42663 20762 2896116506 28215 25252 2221865236 13142 92199 913852288 43155 52574 6014418220 67056 85969 31415 Sep Oct Nov Dec
A 10a 20 aA Err:504 =INDEX(B1:B14,MATCH(TRUE,EXACT(D2,A1:A14),0))B 30 Aa Err:504 =INDEX(B1:B14,MATCH(TRUE,EXACT(D3,A1:A14),0))b 40C 50c 60 EXACT(D2,A1:A14) evaluates;D 70d 80 {FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE 90e 100 MATCH(TRUE,EXACT(D2,A1:A14),0) yields 12Aa 110aA 120 12 in array (A1:A14) for INDEX yields "aA"Bb 130bB 140
SE;FALSE;FALSE;FALSE;TRUE;FALSE;FALSE}
A B D F Averaging letters between A to F C E F C F D AAvg. Value #VALUE! =AVERAGE(INDEX(CODE(UPPER(B2:B12))-64,0,0))Avg. Char #VALUE! =CHAR(CEILING(AVERAGE(INDEX(CODE(UPPER(B2:B12))-64,0,0)),1)+64)Avg. Char D =CHAR(CEILING(SUMPRODUCT(--(CODE(UPPER(B2:B12)))-64)/COUNTA(B2:B12),1)+64)