Results 1 to 2 of 2

Thread: How to recursively build a string concatenation using an array

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2015
    Posts
    117

    How to recursively build a string concatenation using an array

    Hey everyone, I have an interesting need that I think is somewhat challenging. It is just enough to keep things interesting but not too hard.

    I have an array that stores the value of about 10,000 different cells in Excel. The data stored in the array needs to be written to a spreadsheet in a specific way. I need to build up string concatenations based on whether or not the array elements match each other. So for every matching string in the array, I need to store that value in a concatenated string.

    Can somebody give me some example code on how I might achieve this?

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to recursively build a string concatenation using an array

    probably you have not posted enough information for a valid contribution of code

    what is the criteria for the array elements to match?

    you could possibly look at adding all the array items to a collection
    a collection will not allow duplicate values, so if an error occurs when adding an item, then concatenate the values
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width