Does the [ search_type ] difference in MATCH affect performance?
I am trying to consider why I would use 1 instead of 0, and I can only think that it must be a performance issue.
This assumes that search_type 1 uses divide and conquer, where as 0 searches linearly.
I have had situations were using 1 gets a bad result if the lookup range gets sorted, so I make sure I use 0 to mitigate that. And I want to make sure that I am not overlooking someone other downside to using 0.
Answers
-
1 and -1 give an approximate match whereas 0 gives an exact match.
Smartsheet calculates the relative position of a search value by counting cells from left to right (across columns), then top to bottom (across rows). In a lookup table consisting of two columns, the cell in the top row of the leftmost column is the first position, 1.
For the optional [search_type] argument:
- 1 (the default value) finds the largest value less than or equal to search_value (requires that the range be sorted in ascending order).
- 0 find the first exact match (the range may be unordered).
- -1 finds the smallest value greater than or equal to search_value (requires that the range be sorted in descending order).
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!