This is not easy to solve using lookup formulae, unless you fix all your data descending.
MATCH() will return values less than, exact match, and greater than, but the data must be sorted descending.
LOOKUP() and HLOOKUP() work with lists ascending, but will return the highest value that is less than the lookup value if no exact match is found.
You are asking for lowest value that is greater than the lookup value if no exact match is found.
One way around this is to use a formula to reverse the lookup list to descending when it is required to do so.
In H19
Drag Across to Column M then down as required.
We can now use this as an alternative lookup table when the original table row is ascending.
In Sheet1 C31 this mouthful
Drag/Fill Down
This might be easier to follow if we use named ranges, see Sheet "Names", these can be dynamic in your final worksheet.
I have added conditional formatting to highlight when the list is ascending and the alternative table is used for the lookups.
The extra header ascending row is only for reference to see the values returned, it is not requred for the formula.
I can't work out why you think the result for 1001 x 50 is C1, I think it should be B5.
Maybe one of the forums formula whizz-kids can shorten the formula a bit, but, unless I am missing something, I can't see how it can be done without sorting the data consistantly.
I am assuming you are using 2003 as your file suggests, you don't say what version you are using in your profile.
If you are using 2007 or above IFERROR() would simplify things.
Hope this helps.
Bookmarks