Finding Smallest Date in Non Contiguous Range
MIN works with non-contiguousranges but VLOOKUP does not.
you could use a UDF for this or amend your function
=IB(ISERROR(match(MYMIN,range1,false)), _
VLOOKUP(MyMin,Range2,thiscol,false), _
VLOOKUP(MyMin,Range1,thiscol,false))
so check range1, if its an error, val must be range2...so use the VLOOKUP
for range2 if error is true for range1, else use range1
"Ryan" wrote:
I have a lookup formula to find the smallest date in a column or more
specifically a range (SUB_102). The forumlua is correctly finding the
smallest value, however when it looks in the non contiguous range the
forumal errors out. I have the same problem if i define the cells
explicitly instead of using a range. I am using a non contiguous range
in order to exclude a summary cell throughout the column.
In the end this formula should find the smallest date in the range and
return the letter found in column A of the same row. Anyone know how
to make this work?
Thanks.
------SUB_102 range source------
=Worksheet!$U$2:$U$16,Worksheet!$U$18:$U$29
------Cell formula------
=LOOKUP(MIN(SUB_102),SUB_102,Worksheet!A:A)
.
|