• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MATCH FUNCTION using 1 as match type....please help

PP3321

Active Member
I have the following formula:

=MATCH(1,{0,0,0,0},1)

This returns 4.

This is very mysterious to me.
 
Syntax: MATCH(lookup_value,lookup_array,match_type)
If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. The argument lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE.
 
When I did the simple formula.
=INDEX(B2:B4,MATCH(A6,A2:A4,1))

So if it finds equal value, then first occurance.

But not equal value, then the last occurance....

I think I got confused there...

screenshot.jpg
 
@PP3321=INDEX(B2:B4,MATCH(A6,A2:A4,1))
... not good to use match_type 1,
You should use 0 for match_type.
  • If match_type is 1, The argument lookup_array must be placed in ascending order.
  • If match_type is 0, The argument lookup_array can be in any order.
  • If match_type is -1, The argument lookup_array must be placed in descending order.
 
Back
Top