Forum Discussion

Thursdayman's avatar
Thursdayman
Copper Contributor
Feb 10, 2022

Wrong usage of XMATCH in Microsoft's Example

Is it just me or the interpretation of example 2 in this https://support.microsoft.com/en-us/office/xmatch-function-d966da31-7a6b-4a13-a1c6-5a33ed6a0312 is wrong? The example 2 is what is in the image below in case you don't want to click that link.

 

 

Using 1 for the Match-mode returns the position of the next largest item ($15,901) but the writer interpreted it to mean the number of occurrences greater than the specified number ($15,000).

 

This is their interpretation in quotes below:

 

"This next example finds the number of sales people eligible for a bonus. This also uses 1 for the match_mode to find an exact match or the next largest item in the list, but since the data is numeric it returns a count of values. In this case, the function returns 4, since there are 4 sales reps who exceeded the bonus amount."

Did I misread?

1 Reply

  • Thursdayman 

    Since the Total Sales amounts are sorted in descending order, the index of the last value greater than or equal to 15000 (the number returned by XMATCH) is also the number of Total Sales amounts larger than or equal to 15000.