Forum Discussion
Use cell value to return date value
The third argument of the MATCH function specifies the match type.
A value of 0 means that the function will find the first exact match. A value of -1 means that the function will find the smallest value that is greater than or equal to the lookup value.
If you’re getting an error with the original formula, it could be because there is no exact match for 0 in the range H16:H103. In this case, using a match type of -1 will return the smallest value that is greater than or equal to 0, which may not be what you want.
If you want to find the first occurrence of 0 in the range H16:H103 and return the corresponding expiry date from the range A16:A103, you should use a match type of 0. If this returns an error, it means that there is no exact match for 0 in the range H16:H103.
If you’re getting a date that is prior to the expiry date with your modified formula, it could be because there is no exact match for 0 in the range H16:H103 and the MATCH function is returning the position of a value that is greater than 0.
Can you please check if there is an exact match for 0 in the range H16:H103?
NikolinoDE I attached a sample with the -1 it works