Hi,
MATCH(lookup_value,lookup_array,match_type)
I am using the MATCH function to specify in which row of a large table I want to be looking up values.
The column I am MATCH-ing contains numbers in ascending order. For smaller values, the increment is 0.1 , then 0.5, finally the numbers are all consecutive integers.
If my input value is exactly matched in the table, I want the match to be that value. If there is no exact match, I want to go to the next greatest. In the words of Microsoft Help, I want to "find the smallest value that is greater than or equal to lookup_value". However, this is consistent with match_type -1 which only works for data in descending order.
I have got this to work with an IF statement that first checks if my input value is in the lookup column and then adds 1 to the MATCH value if not:
=IF(ISNA(VLOOKUP(input,lookup,1,FALSE)),MATCH(input,lookup)+1,MATCH(input,lookup))
But this is very inelegant and will make my final formulae where is value is to be used very long.
I'm surprised not to find a million of these questions posted on the board - perhaps there's a neat solution that everyone except me knows about?
Thanks,
Melanie
MATCH(lookup_value,lookup_array,match_type)
I am using the MATCH function to specify in which row of a large table I want to be looking up values.
The column I am MATCH-ing contains numbers in ascending order. For smaller values, the increment is 0.1 , then 0.5, finally the numbers are all consecutive integers.
If my input value is exactly matched in the table, I want the match to be that value. If there is no exact match, I want to go to the next greatest. In the words of Microsoft Help, I want to "find the smallest value that is greater than or equal to lookup_value". However, this is consistent with match_type -1 which only works for data in descending order.
I have got this to work with an IF statement that first checks if my input value is in the lookup column and then adds 1 to the MATCH value if not:
=IF(ISNA(VLOOKUP(input,lookup,1,FALSE)),MATCH(input,lookup)+1,MATCH(input,lookup))
But this is very inelegant and will make my final formulae where is value is to be used very long.
I'm surprised not to find a million of these questions posted on the board - perhaps there's a neat solution that everyone except me knows about?
Thanks,
Melanie