+ Reply to Thread
Results 1 to 10 of 10

can the text of two cells be combined with merge

  1. #1
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    can the text of two cells be combined with merge

    Hello everyone,

    I dont think this is possible but if someone can tell me for sure it would be much appreciated!

    Ive got numbers in cell A eg. 10062

    I have then got a dash & a letter in cell B eg. -H

    Is there anyway that is not manual to join the two so they become 10062-H in a singel cell, with a view to apply it to hundeds of numbers?

    Thanks

    Jamie.c

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: can the text of two cells be combined with merge

    What do you mean by 'not manual'?
    If the data is all in two columns, then a simple formula should suffice.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: can the text of two cells be combined with merge

    Thanks for your speedy reply,

    By manual I mean individually going into each cell & adding the text hundreds of times,
    would it be possible for you to help me out with the code as i have got a very basic knowledge of excel.

    Any help would be much appreciated.

    Kind regards

    Jamie.c

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: can the text of two cells be combined with merge

    Is it OK to use a formula in another column or do you actually want to replace one of the existing columns with the combined data? Also, I am assuming that the data is all together in two adjacent columns, is this the case?

  5. #5
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: can the text of two cells be combined with merge

    It would be excellent if you could replace cell whats in cell A & B with the comblined text in cell A and then I can delete the contents of column B.
    The data is adjacent.

    Many thanks

    Jamie.c

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: can the text of two cells be combined with merge

    Here's some code. Note:
    1. You need to select your data first (both columns)
    2. It's air code, so untested!

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: can the text of two cells be combined with merge

    Thank you very much Romperstomper!

    I will give it a whirl & let you know how I got on

    Thanks again

    Jamie.c

  8. #8
    Forum Contributor
    Join Date
    05-14-2007
    Posts
    117

    Re: can the text of two cells be combined with merge

    Ive added the code you kindly sent me into a worksheet, By right clicking on the sheet and clicking view code then pasting into the page. Is that correct? what trigger the code to work?

    Many thanks

    Jamie.c

  9. #9
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: can the text of two cells be combined with merge

    You could also do =A1&B1 in C1, copy down as needed, copy C and paste special as values over itself, and delete columns A and B.

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: can the text of two cells be combined with merge

    Quote Originally Posted by jamie.c View Post
    Ive added the code you kindly sent me into a worksheet, By right clicking on the sheet and clicking view code then pasting into the page. Is that correct? what trigger the code to work?
    Not quite. You need to insert a new module (after the View Code step, choose Insert-Module from the menu) and paste the code in there. Then press Alt+f11 to go back to the main Excel window, select the data, then press Alt+f8 to bring up the macros dialog and run the CombineData macro.

+ 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