Share via

SUBSTITUTE function with dynamic array -- works great but is this an Excel bug?

Anonymous
2022-08-21T22:21:40+00:00

The original puzzle "use dynamic arrays to get into E the column header where values in B through whatever match the value in same row A".

I put this expression in a LET formula and it works:

NOTE 1. The number 2 does not exist in seq

NOTE 2. No text exists in the dynamic arrays generated by SEQUENCE

NOTE 3. In Dewey the required argument old_text is missing

Is this a bug, a feature or am I going crazy?

P.S. If somebody has a better solution than TRANSPOSE(TEXTSPLIT(TEXTJOIN... to collapse a multicolumn array where exactly one element per row is not blank into a single column containing only the nonblank elements I'd like to know. Thanks.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Ashish Mathur 102K Reputation points Volunteer Moderator
    2022-08-21T23:37:37+00:00

    Hi,

    Enter this formula in cell E2 and copy down

    =INDEX($B$1:$D$1,1,MATCH(TRUE,INDEX(B2:D2=A2,,),0))

    Does this help?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Ashish Mathur 102K Reputation points Volunteer Moderator
    2022-08-21T23:49:34+00:00

    Thank you for your kind words. If i figure out the reason, I will post it.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-08-21T23:42:14+00:00

    Hi, Ashish --

    I have seen your work in this forum and I am impressed.

    I am not looking for another way of doing this using copy down. My OP states using dynamic arrays.

    My big problem is SUBSTITUTE takes three required arguments according to MS documentation and I successfully executed a formula with one of them missing. This is not supposed to be possible and looks like an Excel bug.

    Thanks

    Was this answer helpful?

    0 comments No comments