I have a table of timber sizes we stock
I want to work out the correct timber size to sell, my array has the following (A15 is the firstcell)
3.0
3.3
3.6
3.9
4.2
4.5
4.8
5.1
5.4
which are the timber sizes stocked
I want to return the correct timber size eg customer wants 4.3m of timber we only stock 4.5 so it should look up the list, not find 4.3 and return the next one up 4.5 (not down because its would not be long enough)
Ive got it to work with the following (B26 is the required timber length)
=INDEX(A15:A23,MATCH(B26,A15:A23)+(VLOOKUP(B26,A15:A23,1)<>C1))
However it works as long as the length required isnt the same as the length stocked eg if you want 4.2 and 4.2 is in the list it still returns 4.5, it still goes up to the next size.it doesn't realise that the 4.2 length matches so keep that. ????
Bookmarks