Results 1 to 5 of 5

Thread: How to merge two cells without deleting data from the cell

  1. #1
    Join Date
    Nov 2011
    Posts
    91

    How to merge two cells without deleting data from the cell

    I am highlighting two cells in the same row, hitting format cells, alignment, merge cells and I'm getting the error message, "The selection contains multiple data values. Merging into one cell will keep the upper-left most data only." I want to be able to make the two separate cells one without deleting anything and without having to cut and paste.

  2. #2
    Join Date
    Jul 2011
    Posts
    640

    Re: How to merge two cells without deleting data from the cell

    You can't, you can concatenate 2 cells into one by using a formula and ampersand =A1&" "&B1. However stay away from merging cells, always cause more problems than what it's worth and layout wise you can get very close without using it. I have never seen a power user using merging.

  3. #3
    Join Date
    Nov 2011
    Posts
    91

    Re: How to merge two cells without deleting data from the cell

    Thank you so much for sending me this formula. It worked perfectly and did exactly what I needed. I really appreciate your quick, helpful response.

  4. #4
    Join Date
    Aug 2011
    Posts
    695

    Re: How to merge two cells without deleting data from the cell

    So the answer is no, but there is a trick, you create a third cell, and you associate a CONCATENATE cells. ex: = CONCATENATE (C2, D2, E2) (associate cell content of C2 D2 E2). Just to mention one little thing on the response. The formula used to put in the same cell A1 and then the contents of a space and the contents of B1. If do not have space, simply remove & "" & which corresponds to "and commercial" button located on the one (at least on my keyboard).

  5. #5
    Join Date
    Aug 2011
    Posts
    540

    Re: How to merge two cells without deleting data from the cell

    Excel offers the ability to summarize, cells. About the "Format - Cells - Alignment - Merge Cells", you can combine two cells into one unit. What do you do when two cells are located in content that does not want to lose you? Insert VBA to solve the task. The example in the following figure shows a short list of names. You want to summarize the contents of the two columns A and B in the first column A and then combine the two cells in columns A and B into one cell. The following macro does the job:
    Dim row As Integer
    Code:
    Line = 1 
    
    While Not (IsEmpty (Cells (row, 1))) 
    
    Cells (row, 1) = Cells (row, 1) & "" & Cells (row, 2) 
    
    Cells (row 2). ClearContents 
    
    Range (Cells (row, 1), Cells (row, 2)). Merge 
    
    Row = row + 1 
    
    Applicable 
    
    Columns (1). AutoFit 
    
    End Sub
    The macro loops through the lines from line 1 to column A appears in an empty content. For every non-empty content, the content of A and B (separated by a space) concatenated. Subsequently, the two cells A and B are connected to a cell.

Similar Threads

  1. Want help to filter merge cell in Microsoft Excel
    By DEvOTeEL in forum MS Office Support
    Replies: 2
    Last Post: 24-02-2012, 07:00 PM
  2. How to copy paste content in Merge Cells
    By HangOver in forum MS Office Support
    Replies: 2
    Last Post: 27-01-2012, 04:13 PM
  3. Replies: 3
    Last Post: 11-01-2012, 05:59 PM
  4. Short cut to merge cells in Microsoft Excel
    By Jesus2 in forum Windows Software
    Replies: 3
    Last Post: 24-11-2009, 06:31 AM
  5. Clear Content in cell without deleting formula
    By ARTHUR18 in forum Windows Software
    Replies: 3
    Last Post: 05-06-2009, 11:03 AM

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
  •  
Page generated in 1,713,854,181.42276 seconds with 17 queries