+ Reply to Thread
Results 1 to 7 of 7

Merge/Combine different data types into one cell?

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Merge/Combine different data types into one cell?

    Hi everyone. I'm using 2007 Excel (also have access to 2003).

    My goal is to add alpha characters to columns of numerical data. Basically, I have a report of employees (about 1300) that has their ID numbers (i.e., 98765). I want to add two alpha characters (i.e., AB) in front of the ID numbers without having to go into each cell and manually typing or pasting the letters.

    Here's a quick example:
    Capture.PNG


    I tried to merge the cells, but received the message about only displaying the data in the top-left cell. I searched the forums and found a lot of answers, but they all reference data of the same type (i.e., all letters such as first and last names).

    Also, I'm not looking to keep the original cells. The file will be saved as a CSV and uploaded into a program, so I cant' have extra data floating around in the sheet.

    Any help would be greatly appreciated.
    Last edited by sjleiben; 10-10-2012 at 02:12 PM.

  2. #2
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: Merge/Combine different data types into one cell?

    say that "AB" in cell A1, ID number in cell B1

    in c1 = A1&B1

    copy down

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Merge/Combine different data types into one cell?

    you could use a helper column. assume your ID number is in column A...

    ="AB"&A1
    copied down. you can then copy/paste values either over the formula, or over the original data...then delete which-ever column you dont need to keep
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merge/Combine different data types into one cell?

    @dwint - Since I can't have the extra cells after combining the data, would the C1 cell give an error when I remove cells A1 and B1?

    @FDibbins - I'd consider myself a noob when it comes to the macro and coding side of Excel, so sorry if I'm not understanding. Wouldn't this be just as much if not more work than just typing in the AB for each cell? If I have 1300 unique numbers in, lets say, cells B2 thru B1302 it seems like a lot of extra formatting? Am I not understanding your idea?

  5. #5
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: Merge/Combine different data types into one cell?

    Quote Originally Posted by sjleiben View Post
    @dwint - Since I can't have the extra cells after combining the data, would the C1 cell give an error when I remove cells A1 and B1?
    before you remove cell A1 & B1, please copy cell C1 and paste as value
    so, when you remove cell a1 & b1 it would not give error in c1

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merge/Combine different data types into one cell?

    Thanks dwint! I hit a roadblock when trying to copy/paste the cells since the formula was the thing being pasted. A coworker said to try the Paste Special - Value and it worked.

    Thanks again to both you and FDibbins for the help!!!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Merge/Combine different data types into one cell?

    your welcome, and thanks for the star

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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