+ Reply to Thread
Results 1 to 45 of 45

LET me add value's to an array

  1. #1
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    LET me add value's to an array

    Dear all

    LET me explain what I want. It's specific; I got in my LET function two array's results from a Filter in the same Let function and a variable from a Cell.

    Please Login or Register  to view this content.
    Expected result : array_Final contains {1;5;3;4;2;7}

    Three questions:

    How can I add/merge two array's?
    How can I add a variable to the end of an array?
    Is there a way to insert a variable at a certain array location?


    Thank you very much
    Last edited by lord anubis; 04-23-2023 at 05:33 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Did you look at VSTACK?

    e.g. =VSTACK(array_1;array_2)

    You could add SORT to this if you wanted to.

    Not quite sure what you are expecting for the final array, sorry.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Hi,


    Actually no, because as far as I understand VStack is for Cells, and My Array's are not. They are just in the scope of this LET.

    Wanted Results added above.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Oh, well! If you can't even be bothered to try it ...

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    1
    1
    =LET(
    array_1, {1;5;3}, array_2,{4;2},
    myVar,A1,
    array_merged, VSTACK(array_1,array_2),
    array_merged )
    2
    5
    3
    3
    4
    4
    5
    2
    Sheet: Sheet1

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    And with everything included:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    1
    1
    7
    =LET(
    array_1, {1;5;3}, array_2,{4;2},
    myVar,B1,
    array_merged, SORT(VSTACK(array_1,array_2,myVar),,1),
    array_merged )
    2
    2
    3
    3
    4
    4
    5
    5
    6
    7
    Sheet: Sheet1
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Or, if you want it horizontally:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    F
    14
    =LET(
    array_1, {1,5,3}, array_2,{4,2},
    myVar,A16,
    array_merged, SORT(HSTACK(array_1,array_2,myVar),,1),
    array_merged )
    15
    1
    5
    3
    4
    2
    7
    16
    7
    Sheet: Sheet1
    Attached Files Attached Files
    Last edited by AliGW; 04-23-2023 at 05:21 AM. Reason: Typo fixed.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Correction to the SORT element of the HSTACK version:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    F
    14
    =LET(
    array_1, {1,5,3}, array_2,{4,2},
    myVar,A16,
    array_merged, SORT(HSTACK(array_1,array_2,myVar),,1,TRUE),
    array_merged )
    15
    1
    2
    3
    4
    5
    7
    16
    7
    Sheet: Sheet1
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Any good?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    "Oh, well! If you can't even be bothered to try it ... "
    I think about to many assumptions.

    Who said that I didn't try it before and after. Actually, If I did try Stacks; I did get the #Name error; now and in the past. If I copy/past your sample I get also #Name error.
    This machine has version 16, but not >16.65, the first with the Stacks.
    BTW the docs show's it is used for cells, I did look at the samples before.


    Any other way to append two array's?


    Another question.

    How does the LET result knows the difference between VStack and HStack? Has finalArray or is an Array a hidden structure even it is just a variable with inherited knowledge to print it in a certain direction or rectangular range?

    For me it looks like a flaw, because I can't use Stacks. My guess, if I look at your screenshot samples, it will gives Spill! errors when someone like me have/need several Cells with LET's vertical in a column under eaach other. What if I need Let with Stacks in a table column? Or is there a solution around?

    So basically: Any other way to append two array's in a LET function?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    If I copy/past your sample I get also #Name error.
    Yes, because you are using a European locale, which is why I supplied you with a workbook.

    This machine has version 16, but not >16.65, the first with the Stacks
    They are new in MS365. I assumed that you were using a newer version as you are using the LET function.

    How does the LET result knows the difference between VStack and HStack? Has finalArray or is an Array a hidden structure even it is just a variable with inherited knowledge to print it in a certain direction or rectangular range?
    VSTACK means vertical stack, HSTACK means horizontal stack.

    I think about to many assumptions.
    Only that you were using MS365 because of LET. LET was new in Excel 2021.

    Your not having MS365 isn't a flaw, it just means that VSTACK and HSTACK won't work for you.

    BTW the docs show's it is used for cells, I did look at the samples before.
    Online tutorials rarely cover every use of a new function - it's ALWAYS worth trying something out.

    Unfortunately, I don't know how to do it without those newer functions. Sorry.

    Actually, If I did try Stacks; I did get the #Name error;
    In post #3 in response to my question about whether you'd tried VSTACK, you said this:

    Actually no,
    Last edited by AliGW; 04-23-2023 at 06:58 AM.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    I'm not clear if you want to emulate VSTACK or HSTACK. This will do the former:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    ... and this does the latter:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by AliGW View Post
    Yes, because you are using a European locale, which is why I supplied you with a workbook.




    They are new in MS365. I assumed that you were using a newer version as you are using the LET function.




    VSTACK means vertical stack, HSTACK means horizontal stack.



    Only that you were using MS365 because of LET. LET was new in Excel 2021.

    Your not having MS365 isn't a flaw, it just means that VSTACK and HSTACK won't work for you.




    Online tutorials rarely cover every use of a new function - it's ALWAYS worth trying something out.

    Unfortunately, I don't know how to do it without those newer functions. Sorry.



    In post #3 in response to my question about whether you'd tried VSTACK, you said this:
    No inline response.
    European locale... Nope nothing to do with that; it is the software version; on a newer Excel version it works; but on this machine I need to stay on a non latest version.
    BTW, on this machine I use an English universal setup with a Qwerty Ducth keyboard setting. This means only the ',' need to replaced by an ';'. On my other machine I use tweo accounts; a Dutch account and second a French Flemish account and if I want I can use a Azerty keyboard. My wife use Arabic with a Arabic Keyword. So the language is of no issue.


    There are several out-roles between LET and Stacks.

    I know what H and VStack means; unfortunate HStack is not a real HStack as it shows its data as X-Y rectangle like I see on my other machine and in you samples. And it gives Spill! errors like I thought.
    They should call it differently.


    It where MS-Docs specific about LET and not a tutorial; I wrote docs, not tutorials.

    Actually No - No for this situation. If your friend ask when he's looking in the fridge; "did you go to the shop?". Are in you thoughts now 'all the moments that you ever did go to the shop' or just 'recently f.e today'.

    Anyway thank you for your help; good for newer versions and other context, but not good for this moment, I can't use it right now. HStuck doesn't work right for now for me. The 'club' that will use this sheet has an older version of Excel. Let, Filter and Sequence and I believe XLookup are in there.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Was any/some/all of that directed at me?

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Was any/some/all of that directed at me?

  16. #16
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Hi Glenn,

    Unfortunate, I just need what was written in the OT.

    Adding Array's inside a LET construction.
    They are just in the scope of this LET.
    The return result is just for knowing if it did work.

    Thank you.

  17. #17
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by Glenn Kennedy View Post
    Was any/some/all of that directed at me?
    No why? I just finished checking your code.


    A Side Note; no need to emulate a V or HStack. Just adding two local LET array's in an LET local variable.

    Thanks for asking.
    Last edited by lord anubis; 04-23-2023 at 10:09 AM.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    I did not understand what you wanted. Please post ab Excel file showing before/after.

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    It's all aimed at me, Glenn.

    @lord anubis - thanks for sharing your set-up with me.

    In terms of HStack, I don't understand at all why you think it is a misnomer: VStack returns a vertical range (single column one cell wide) and HStack returns a horizontal range (single row one cell deep).

    Does Glenn's suggestion help you at all?

  20. #20
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by Glenn Kennedy View Post
    I did not understand what you wanted. Please post ab Excel file showing before/after.
    How should I do that, it is in memory in a LET Statement; please read my first post, there are no Cells involved.

    Just - array2 merging or appending with array1 and putting that in an other var to be used in a LET function.

  21. #21
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by AliGW View Post
    It's all aimed at me, Glenn.
    VStack returns a vertical range (single column one cell wide) and HStack returns a horizontal range (single row one cell deep).
    If you check your own sample then you will see HStack result is not on one single row only.

    I did wrote that before; did you find that? Also do you know more about my secondary question about the knowledge of an array about how to print itself.

    Never mind, another difference between versions. Did just update my other machine to the latest version 16.73 from a few days back and it looks better now. But again, the target is without using Stacks.
    Last edited by lord anubis; 04-23-2023 at 10:44 AM.

  22. #22
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Just to clarify, did my VSTACK version produce the correct result? If so, Glenn can use that as a guide.

    HStack result is not on one single row only.
    Oh, yes it is!!! The cell on the row below is the MyVAR reference cell.

    Here it is without the reference cell:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    F
    14
    =LET(
    array_1, {1,5,3}, array_2,{4,2},
    myVar,7,
    array_merged, SORT(HSTACK(array_1,array_2,myVar),,1,TRUE),
    array_merged )
    15
    1
    2
    3
    4
    5
    7
    16
    17
    Sheet: Sheet1

    Also do you know more about my secondary question about the knowledge of an array about how to print itself.
    On a UK locale, a comma will produce a horizontal array and a semi-colon a vertical one:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    Q
    R
    S
    T
    U
    V
    3
    =LET(
    array_1, {1;5;3},
    array_1)
    =LET(
    array_1, {1,5,3},
    array_1)
    4
    1
    1
    5
    3
    5
    5
    6
    3
    Sheet: Sheet1
    Last edited by AliGW; 04-23-2023 at 10:44 AM.

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    I see you have edited your previous post to say that you have updated your version now, so how about this?

    It uses TEXTJOIN and TEXTSPLIT.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  24. #24
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    This is the same as Post 11, except I have used two single column arrays. I merged them and then used the merged set in a final calculation to return only the odd numbers. If this is not what you wanted, then I have totally misundersttood you.
    Attached Files Attached Files

  25. #25
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    And this will give a horizontal array:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Even more differences.
    Last edited by lord anubis; 04-23-2023 at 11:08 AM.

  27. #27
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Ali, I think TEXTSPLIT was released at the same time as VSTACK, so it probably won't be available to the OP. either.

  28. #28
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Quote Originally Posted by lord anubis View Post
    Even more differences.
    To whom are you talking? What differences?

  29. #29
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    The OP has just said that he has now updated his version. See the late edit he made to his previous post. I take this to mean that we can now use 365 functions.

  30. #30
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by AliGW View Post
    The OP has just said that he has now updated his version. See the late edit he made to his previous post. I take this to mean that we can now use 365 functions.
    No, the goal is the older version, please please stay at my question. No Stacks. the target machine has no stacks.

    Do you read "But again, the target is without using Stacks."


    I will check your new sample with TEXTSPLIT; As far as I know those are both available at the target machine.
    Thanks
    Last edited by lord anubis; 04-23-2023 at 11:17 AM.

  31. #31
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Even more differences.
    Of your making!

    When you define your arrays, they must ALL be separated either with commas or semi-colons, NOT a mix of the two.

    =LET(
    array_1; {1;5;3},
    array_2; {4;2},
    ...)

    OR

    =LET(
    array_1; {1,5,3},
    array_2, {4,2},
    ...)
    Last edited by AliGW; 04-23-2023 at 11:38 AM.

  32. #32
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    No, the goal is the older version, please please stay at my question.
    The latest formula does not use either VSTACK or HSTACK. What do you mean exactly by stacks?

    I am trying VERY HARD to help you here, but you really are not making it easy. You won't show us what you want, so we're having to guess. Hardly surprising, then, that we are not getting what you want.

    You are not making yourself clear at all.

    Do you read "But again, the target is without using Stacks."
    YES, I am reading EVERYTHING, but you keep editing your posts and you are not answering our questions clearly.

    Show us in an Excel file what you would expect your formula to produce. Do this manually.

  33. #33
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Realy. The popup displays as soon as I click somewhere else in the let function.

    Here one with what you suggest.
    Attached Images Attached Images

  34. #34
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    It's because you have a European locale (as I have mentioned).

    I found this online:

    Countries using a decimal comma however use a \ as a column delimiter and a ; for rows respectively.
    Change the commas EITHER to semi-colons OR a slash \.

    Let me know if that works.

  35. #35
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    I think I finally understand what's wanted!!

    If the OP was able to use HSTACK or TEXTSPLIT your approach Ali looks correct. I could replicate it using FILTERXML... but it doesn't work on a Mac OS.

  36. #36
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Well done, Glenn! I am just trying to get the OP to tweak the formula for his European locale. Once this is done, I think we'll be there.

    I shall be very glad when this is over ...

  37. #37
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    So, to summarise, arrays need to look like this:

    =LET(
    array_1; {1;5;3},
    array_2; {4;2},
    ...)

    or this:

    =LET(
    array_1; {1\5\3},
    array_2, {4\2},
    ...)

  38. #38
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Try this (no VSTACK, no TEXTJOIN). It may need ; or \ as array separators.
    Attached Files Attached Files

  39. #39
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Nice one, Glenn. At least I got the heavy lifting done!!!

  40. #40
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Edit: it needs a tweak to return real numbers:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  41. #41
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    And it can, of course, be shortened to this:

    Please Login or Register  to view this content.

  42. #42
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    Lord A...

    what happens when you paste this into your Excel:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  43. #43
    Forum Contributor
    Join Date
    07-16-2009
    Location
    DutchLand
    MS-Off Ver
    Excel MacOS 16
    Posts
    161

    Re: LET me add value's to an array

    Quote Originally Posted by Glenn Kennedy View Post
    Lord A...

    what happens when you paste this into your Excel:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It works.......so far.

    The difference between ';' and '\' is none; instead of the written difference between ';' for Vertical and ',' ( \) for Horizontal.
    So I did Transpose the result to get a Row.

    Please Login or Register  to view this content.
    Thank you both. No V or HStack needed.


    What I do understand now is that a Array is a kind of part of a matrix or at least a substitute, and it, the Array is or a row or a column from the matrix. And so will it be used in calculation and visibility ( read showing up in a row or column ). Still the question... never mind.


    BTW, I do have this saved at my other computer; but was out of my reach.
    Please Login or Register  to view this content.
    Last edited by lord anubis; 04-23-2023 at 02:37 PM.

  44. #44
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: LET me add value's to an array

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  45. #45
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: LET me add value's to an array

    Glad we got there in the end.

+ 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. Replies: 6
    Last Post: 06-07-2022, 09:30 AM
  2. Replies: 5
    Last Post: 02-22-2018, 01:47 AM
  3. Replies: 1
    Last Post: 01-04-2018, 01:07 PM
  4. [SOLVED] Array formulae with different sized array, e.g. array-if() or somproduct-if()?
    By hlhans in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2016, 03:59 PM
  5. [SOLVED] Populate one array from another array and print new array as a range
    By Kaden265 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2014, 07:52 AM
  6. [SOLVED] Quick Array question - Copy array to another array then resize?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-02-2013, 01:17 AM

Tags for this Thread

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