Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Merge cells without losing data

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merge cells without losing data

    Hi

    This is a plea for help from a excel novice. I need to merge two columns of cells without losing the data in both.

    e.g column 1 - 123
    column 2 - 456

    I need it to show 123456

    Is there a way of doing this. I have 12647 rows to do this to and dont fancy manually changing these.

    Thanks in advance

  • #2
    Re: Merge cells without losing data

    In Column 3:

    =Column1&Column2

    Or =CONCATENATE(Column1,Column2)

    Hope this helps

    Alastair
    Einstein:
    Things should be made as simple as possible, but not any simpler

    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

    Comment


    • #3
      Re: Merge cells without losing data

      Hi
      VBA solution
      1) hit Alt + F11 to open VB editor
      2) go to Insert -> Module then paste the code there and close the window
      3) in Excel window, go to Tools -> Macro -> Macro and select "test" then hit Run
      The code will merge col.A & B
      Code:
      Sub test()
      Dim i As Long, a
      a = Range("a1", Range("a65536").End(xlUp)).Resize(, 2).Value
      For i = LBound(a, 1) To UBound(a, 1)
          a(i, 1) = a(i, 1) & a(i, 2)
      Next
      With Application
          .DisplayAlerts = False
          .ScreenUpdating = False
          For i = 1 To UBound(a)
              Cells(i, "a").Resize(, 2).Merge
          Next
          Range("a1").Resize(UBound(a, 1)) = a
          .DisplayAlerts = True
          .ScreenUpdating = True
      End With
      End Sub

      Comment


      • #4
        Re: Merge cells without losing data

        Thanks All

        It worked a treat. Now i Can drop all my water hydrants onto our OS map in the correct places.

        Thanks again

        Ade

        Comment


        • #5
          Re: Merge cells without losing data

          Originally posted by Ade V View Post
          Hi

          This is a plea for help from a excel novice. I need to merge two columns of cells without losing the data in both.

          e.g column 1 - 123
          column 2 - 456

          I need it to show 123456

          Is there a way of doing this. I have 12647 rows to do this to and dont fancy manually changing these.

          Thanks in advance
          You can also use this merge cells in exceltool its just via quick copy and paste job. No downloads and free to use.

          Comment

          Trending

          Collapse

          There are no results that meet this criteria.

          Working...
          X