• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Continue to Next Line

Hi All,

My array has a huge list of items. I would like to concatenate each line.
I am searching for a proper syntax which I did not get. Can you kindly help me here.
My array list is:

FlatNo = Array("All", "101", "102", "103", "104", "105", "106", "107",)&_ "108", "109","110", "201", "202", "203")&_
"204","
 
Hi,
The above solution is not working. I am getting compile error.
Find attached the screenshot.
 

Attachments

  • Chandoo-Help.docx
    174.9 KB · Views: 3
Why I am getting the error. Can anyone guide me. I have to create such an error with items till 10001. Hence I want it to be multiple rows, but unable to concatenate it though.
 
There's limit to how many line continuation you can use for single variable.
The limit I believe is 25.

Just create a list of values in worksheet and load to array (or fill array using logic).
 
Hi !

Better way is like Chihiro in previous post via a worksheet.

But if you do not want data on worksheet, use a String variable
to load data and Split VBA function to create an array :​
Code:
     Dim S As String, FlatNo() As String

         S = "All 101 103 104 105 106 107 " & _
             "108 109 110 201 202 203"
       
         S = S & "204 205 " & _
                 "307 308"
   
    FlatNo = Split(S)
Do you like it ? So thanks to click on bottom right Like !

Can be done using only a single Variant variable …
 
Back
Top