Excel: If Match Type Is 0 (zero) FASTMATCH() Returns #VALUE

Last reviewed: November 30, 1994
Article ID: Q91725
The information in this article applies to:
  • Microsoft Excel for Windows, version 4.0
  • Microsoft Excel for the Macintosh, version 4.0

SUMMARY

Page 144 of the version 4.0 "Microsoft Excel Function Reference" indicates that 0 (zero) can be used in the type_of_match argument in the FASTMATCH() function. This information is incorrect. If you use 0 in FASTMATCH(), Excel returns the #VALUE error.

MORE INFORMATION

The FASTMATCH() function uses a binary search algorithm which works only with sorted arrays.

Use the following guide for the type_of_match argument:

  • If your lookup array is sorted in ascending order (lowest to highest, A-Z), use a 1 for type_of_match (or omit it).
  • If your lookup array is sorted in descending order (highest to lowest, Z-A), use a -1 in type_of_match.
  • If your lookup array is not sorted, or if you want to return a positive value only if an exact match is found, use MATCH() instead of FASTMATCH(), and use 0 (zero) for the match_type argument.

    Note: Your lookup_array does not have to be in sorted order if you use 0 (zero) in the match_type argument for the MATCH() function.

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 143-144, 267-268


KBCategory: kbdocerr
KBSubcategory:

Additional reference words: 4.0 4.00 fast match documentation error


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.