+ Reply to Thread
Results 1 to 6 of 6

concatenate a large number of datas (600 lines and 300k characters)

  1. #1
    Registered User
    Join Date
    01-21-2019
    Location
    Luxembourg
    MS-Off Ver
    2010
    Posts
    2

    concatenate a large number of datas (600 lines and 300k characters)

    Hello everybody,
    I am searching for a way to concatenate a large number of data (489 lines and 200k characters) in excel or with other tools. I am searching for a simple concatenation without adding any spacebars, commas etc. In every line there is a code that I have to merge and then include the whole thing in xml file. I found some macros online but none of them work for such a large number of characters. Could anybody suggest me a solution? Your kind help shall be appreciated.
    Attached Files Attached Files
    Last edited by Ventvent; 01-21-2019 at 06:12 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: concatenate a large number of datas (600 lines and 300k characters)

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    01-21-2019
    Location
    Luxembourg
    MS-Off Ver
    2010
    Posts
    2

    Re: concatenate a large number of datas (600 lines and 300k characters)

    Attached please find all 489 line of data that I want to concatenate.

    If there would be just 2 lines of data this simple formula would do a trick: =+A1&A2

    however, because there are 489 lines I am looking for the solution that is not manual.

    I found some macros on the internet but they all have a limitation of cca 250 lines or 50000 characters.

    Could someone direct me to a macro that is not limited or to a program that would do this job?
    Attached Files Attached Files
    Last edited by Ventvent; 01-21-2019 at 06:12 PM.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: concatenate a large number of datas (600 lines and 300k characters)

    Your Data is 199495 Characters. Excel will only allow 32767 Characters in a Cell.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: concatenate a large number of datas (600 lines and 300k characters)

    Maybe you could save it as a .txt file, then put it into Notepad, or some other text editor, then do Find & Replace to change the line-feed character to nothing.

    I haven't tried it, so I don't know if it would work, but …

    Hope this helps.

    Pete

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: concatenate a large number of datas (600 lines and 300k characters)

    Exactly, I was thinking the same as Pete_UK.
    Dump to simple txt file.

    Simple macro:

    Sub SaveMyData()
    Dim myFile As String, i As Integer
    myFile = "D:\hugeDataFile.txt" ' be sure that you have a right for this location, D is my example only
    Open myFile For Output As #1
    For i = 1 To 500
    If (Cells(i, 1).Value <> "") Then
    Print #1, trim(Cells(i, 1).Value); 'semicolon makes concatenation without carriage new line
    End If
    Next i
    Close #1
    End Sub
    Last edited by KOKOSEK; 01-21-2019 at 07:53 PM. Reason: Print i.o. Write to avoid ""
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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. What is the maximum number of characters you can concatenate together...
    By xibalba in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-27-2017, 03:35 AM
  2. [SOLVED] Concatenate variable number of lines within a column
    By ferndiazabarca in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-03-2015, 02:29 AM
  3. [SOLVED] Search/return a cell with a large number of characters from a list (column)
    By jwebber82 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-30-2014, 09:44 PM
  4. [SOLVED] Concatenate variable number of lines
    By GlynRD in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-17-2013, 07:57 AM
  5. Replies: 3
    Last Post: 04-04-2012, 04:07 PM
  6. Concatenate address lines of varying number
    By tone640 in forum Excel General
    Replies: 4
    Last Post: 08-08-2011, 08:18 AM
  7. Empty Workseek: File still too large (>300k)
    By Anik in forum Excel General
    Replies: 2
    Last Post: 03-16-2005, 03:06 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