+ Reply to Thread
Results 1 to 7 of 7

VBA Concanate Loop

  1. #1
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    VBA Concanate Loop

    Afternoon All,

    This has been causing me no end of ishoos - not even sure where to start!

    I have data which I have attached as it looked bad when posted here! There are approx 45,000 rows of the stuff!

    I would like to be able to run a macro which would concatenate the information for each of the references thuly:

    reference - risk number - header comment: comment one comment two

    Hopefully, this is making sense so far!

    The problem is that some of the references have 2 comments under the header comment and some have more or less. I also need to ignore the ------- and the ======= too!

    I did start building some very loopy concatenation code but it didn't really work and then crashed my machine!

    Any help would be gratefully received,

    Thanks in advance,

    MoonWeazel
    Attached Files Attached Files
    Last edited by MoonWeazel; 06-28-2012 at 08:49 AM.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA Concanate Loop

    try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Re: VBA Concanate Loop

    That is awesome!

    Would you be able to concatenate the results onto one line?

    reference - risk number - header comment: comment one comment two

    Cheers,

    MW

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA Concanate Loop

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Re: VBA Concanate Loop

    Hey Nilem,

    Thanks again!

    Unfortunatly I get a syntax error on lines 2 (With Range....) and 8 (x(j,1)....)

    MW

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA Concanate Loop

    Here is your file. Please try again
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Re: VBA Concanate Loop

    Nilem,

    You totally rock!

    Thanks everso!

    MW

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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