+ Reply to Thread
Results 1 to 10 of 10

Concatenate - help

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2005
    Posts
    10
    Thanks a lot anil,
    I am trying to use the formula.. i am newbie to excel vba.. I will play with it for some time now and get back to you on that.. just to make one this sure.. I can just use this formula and select the range everytime i wanna concateneate a bunch of cells right?.. Thanks a lot again

  2. #2
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    I can just use this formula and select the range everytime i wanna concateneate a bunch of cells right?

    Yes that is correct.


    Let me know if you have any questions

  3. #3
    Registered User
    Join Date
    06-11-2005
    Posts
    10
    Hey Anil
    That is great.. it works beautifully.. Only thing is could you tell me how I can add code to format it? I am adding a bunch of lines and I want them to be wrapped so they all the lines i added wont be

  4. #4
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    In what format do you want.

  5. #5
    Registered User
    Join Date
    06-11-2005
    Posts
    10
    Anil,
    I just want to make sure the when I add all that string they appear clearly in that one cell. I want all the text to appear in the cell and also I dont want them to be bunched into one line. As I am adding many lines from different cells I want them to appear line by line in the same cell. Please let me know. Thank you.

    pralav

  6. #6
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    Function concat_range(r As Range)

    Dim val As Variant
    Dim c As Range

    For Each c In r
    val = val & c.Value & Chr(10)

    Next

    concat_range = val


    End Function

+ 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