+ Reply to Thread
Results 1 to 4 of 4

Match on a FILTERXML with exactly 1 value results in an unexpected #N/A. Why?

  1. #1
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Match on a FILTERXML with exactly 1 value results in an unexpected #N/A. Why?

    Match on a FILTERXML with more values ​​works fine.
    Match on a FILTERXML with exactly 1 value results in an unexpected #N/A.

    I do not understand why. Can someone explain that?

    Details in workbook!
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: Match on a FILTERXML with exactly 1 value results in an unexpected #N/A. Why?

    MATCH requires either a range or an array as the second argument. A simple constant value will not work. The odd thing, to me at least, is that if you pass any single value that can be coerced to a number, it returns #N/A, whereas for text it returns #VALUE!, which seems more appropriate.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Match on a FILTERXML with exactly 1 value results in an unexpected #N/A. Why?

    As far as I know, an array can also consist of 1 element. =MATCH(1,SEQUENCE(1),0) just returns a 1 and not #N/A.
    If that doesn't work with FILTERXML, I see that as an imperfection of Excel.

    I then have to take that into account and that leads to 'weird' formulas.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: Match on a FILTERXML with exactly 1 value results in an unexpected #N/A. Why?

    Yes an array can consist of one element, but 1 is not an array, whereas {1} is. SEQUENCE always returns an array whereas it would seem FILTERXML does not if there is only one item. You can view that as an imperfection or not, but it's not going to change it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Index Match across two sheets giving unexpected results
    By Sprong in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-30-2019, 04:02 PM
  2. [SOLVED] VBA producing unexpected results
    By trandle in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-20-2017, 09:43 AM
  3. Search & Match Functions return unexpected results
    By ilikerolls in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-07-2017, 02:23 PM
  4. [SOLVED] range.value = var ...unexpected results.
    By excel_joe in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-22-2016, 02:59 PM
  5. [SOLVED] Unexpected results from MSQuery
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2014, 11:09 AM
  6. [SOLVED] Using Index Match or Vlookup giving unexpected results on imported data
    By jacob@thepenpoint in forum Excel General
    Replies: 2
    Last Post: 07-03-2012, 05:49 PM
  7. VLOOKUP with unexpected N/A results
    By cgjones in forum Excel General
    Replies: 2
    Last Post: 03-15-2011, 04:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1