Results 1 to 10 of 10

BYROW limitations: ranges vs. arrays

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    693

    BYROW limitations: ranges vs. arrays

    Hi, I've read a number of threads on the problems BYROW has, which I guess have mostly to do with not being able to handle arrays of arrays/nested arrays.

    Some common workarounds I've seen employ REDUCE which I find a bit unwieldy due to slow calculation speed with large data sets and REDUCE coming along with its own drawbacks, such as often involving dropping the first returned result (not always clear to me why) and and formulas delivering different results/not working at all depending on the initial value of e.g. '=REDUCE(,...' vs. '=REDUCE(0,...' vs. 'REDUCE("",...' (also not clear to me why).

    So I turned to MAP solutions which seems to be considered more robust in situations where BYROW fails.

    In the attached file I wrote down a common problem of BYROW that doesn't seem to exist with MAP.
    BYROW in that example works with a range reference, but not with a SEQUENCE-function containing the same as the referenced range nor with a TRANSPOSE-function of the referenced range.
    MAP works in all scenarios described.

    I found the following article (response by Sergei Baklan) quite helpful in navigating the situation, i.e. employing some =INDEX(i,1,1)-construct:
    https://techcommunity.microsoft.com/...ow/m-p/3777828
    It got the previously incorrectly working BYROW-formulas to return correct results in line with the results returned by MAP.

    However, I still don't think I fully understand what's going on here, so happy if somone maybe has some more useful explanation or reference for me on the topic of what exactly is the issue with BYROW here, why MAP works (but BYROW not), see e.g. the 2 questions raised in the Excel file.
    In some places this behaviour has been described as a bug, but it seems like not everybody agrees on this.
    Fundamentally it seems to come down to an array not being the same as a range reference in all circumstances/formulas alike?

    Similar to the following simplified problem:
    =SEQUENCE({2})
    returning 1 despite a formula evaluation shows the array,
    {1;2}
    which - upon pressing ENTER - spills correctly, whereas
    =SEQUENCE(INDEX({2},1))
    returns and spills correctly:
    {1;2}
    Compare this to e.g.:
    =SUM(1,2,{2})
    working without having to reference the array via INDEX.

    Any help, explanation or guidance for further reading is highly appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by RaulSerg; 05-06-2024 at 08:03 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 12-07-2016, 07:41 AM
  2. [SOLVED] Ranges in selection and arrays
    By fgq in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-19-2013, 01:07 PM
  3. [SOLVED] How to use Arrays instead of Ranges
    By Sachy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-10-2013, 10:54 AM
  4. Adding two Ranges/Arrays together
    By dbrutocao in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2013, 06:37 PM
  5. arrays and ranges
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2012, 12:18 PM
  6. size limitations of VBA arrays?
    By broro183 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2009, 09:10 PM
  7. Ranges and Arrays
    By Will Brown in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2005, 12:07 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