+ Reply to Thread
Results 1 to 11 of 11

Concatenate array name

  1. #1
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Concatenate array name

    Hi,
    I have four arrays named 1deg, 2 deg, 3 deg and 4deg.
    I would like to populate the contents of these arrays into range with a single loop i the following manner:
    Please Login or Register  to view this content.
    However this returns only a string composed with the "i" value and word "deg". Is there a way to concatenate the array name, so that the output would be the array contentes not the "i"+"deg" string?

    Thanks in advance
    Regards
    Last edited by crimsontrooper; 07-22-2020 at 07:02 AM.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Concatenate array name

    Along these lines ??
    Please Login or Register  to view this content.
    just noticed does not work, will look at again
    Last edited by nigelog; 07-22-2020 at 07:31 AM.

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Concatenate array name

    Perhaps this Nigelog...
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Re: Concatenate array name

    Hi,
    Thanks for the fast reply.
    I've check and neither of the proposed solutions work. Do you have any other ideas?

    Regards

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Concatenate array name

    Hi Sintek
    I thought I had a solution until I changed the entries in deg4. Trying to call the array name using an i integer is not as easy as I Thought
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,788

    Re: Concatenate array name

    How about
    Please Login or Register  to view this content.

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Concatenate array name

    Spot on Fluff
    I was sure I tried the array of arrays but must have missed something. It wasnt my question but thanks, it was starting to annoy me

  8. #8
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,466

    Re: Concatenate array name

    Instead of using deg1, deg2, etc. we can use an array named deg and save VBA the trouble of having to create an array of arrays to work from...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Re: Concatenate array name

    Hi,
    @Rick,Thank you, now it works.
    By the way, is there a method where i would'nt have to write multiple arrays into a new array? In the meantime I will use the code provided by Rick.

    Regards

  10. #10
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,466

    Re: Concatenate array name

    It depends... where did the data for your original arrays come from? In other words, in your original message you said "I have four arrays named 1deg, 2 deg, 3 deg and 4deg"... how did you create those original arrays (you never showed us the code where you did that)?

  11. #11
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Re: Concatenate array name

    @Rick, The original macro is quite long, so here is a code snippet, which I use to generate an example array:
    Please Login or Register  to view this content.
    As you can see, nothing fancy, just straight forward assigning range to array.
    This way I have four arrays containing the results of the LinEst function. Finally the contents of these arrays are plotted into choosen range.

+ 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] Using Concatenate and Array into one List
    By Excell1677 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-17-2016, 05:01 AM
  2. Concatenate / Array Help
    By burgie10 in forum Excel General
    Replies: 5
    Last Post: 09-05-2015, 05:07 AM
  3. =CONCATENATE within an array
    By gassiusmax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2015, 12:22 PM
  4. How To Concatenate an Array?
    By Camel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-02-2013, 05:01 AM
  5. Variable name concatenate with array
    By Bmoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2010, 07:20 AM
  6. Array Formula - Concatenate
    By Lotus123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2006, 10:36 PM
  7. Concatenate an array
    By Ed in forum Excel General
    Replies: 4
    Last Post: 07-03-2006, 01:00 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