0
I am trying to search a data table in excel and find the bottom most row that meets a specific criteria. I thought I could use this LOOKUP trick but it only returns a #DIV/0
error. This is what I tried:
=LOOKUP(2,1/AND(ABS(Data!$I$2:$I$976-Calc!$D$2)<Calc!$F$1,Calc!$A6=Data!$J$2:$J$976),Data!$G$2:$G$976)
The criteria is that the value in column Data!I
needs to be within a certain range of the value in Calc!D2
and the value in column Data!J
needs to be equal to the value in the value in Calc!A6
I'd like to avoid VBA if I can (which is why I'm on SU and not SO).
I think you left out the second
if
function but I think I see what you are trying to do. Make an array that is either the row number or zero if if doesn't meet the criteria. Then find the max row number. – Fr33dan – 2014-07-29T17:40:36.280added the second if. Your analysis of what it is actually doing is spot on (it also probably should have been in my answer). – gtwebb – 2014-07-29T18:15:44.450