How to split cells, combine cells in Excel

On Excel spreadsheets, many times you need to split cells, merge cells to fit the data you need to enter. You can combine two or more cells together using Excel's built-in functions or use Visual Basic to combine multiple cells together without losing data. After merging cells, you can also split the merged cells or split a cell into two cells. To know how to combine or split cells in Excel, please refer to the following article.

How to split cells, combine cells in Excel Picture 1

Here's an article on how to split cells, combine cells in Excel, please follow along.

HOW TO MEET A BOX IN EXCEL

Method 1: Use Merge & Center

Note: Only the data in the first cell in the upper left will remain the other cells while merging will lose all data.If the data is using a table style in Excel, it will not be possible to merge cells. , you need to convert the table into regular cells before you can manipulate cells.

Step 1 : Select (black out) adjacent cells to be merged.

How to split cells, combine cells in Excel Picture 2

Step 2 : Select the Home tab , in the Alignment section, select the down arrow icon next to Merge & Center and select the type of cell merge. There are three types of cell aggregation to choose from:

1. Merge & Center

If Merge & Center is selected, the cells you select will be combined into one large cell, the text in the first merged cell will be centered among the merged large cells.

How to split cells, combine cells in Excel Picture 3

2. Merge Across

If you select Merge Across , the cells you select will be combined together in separate lines.

How to split cells, combine cells in Excel Picture 4

3. Merge Cells

If you select Merge Cells , the cells you select will be combined into a single cell without center alignment like Merge & Center.

How to split cells, combine cells in Excel Picture 5

Method 2: Using Visual Basic to merge cells without losing data

If you want to combine cells whose data is also included in the cells, then do the following:

Step 1: Select (black out) the cells to merge cells, next select the card View -> Macros or you press the combination Alt + F8.

How to split cells, combine cells in Excel Picture 6

Step 2: On the interface of the Macro window, enter any name you want in the Macro name box (put the name without spaces) -> Create to open the Visual Basic window .

How to split cells, combine cells in Excel Picture 7

Step 3 : In the Module window, enter the following code in the middle of Sub test () . End Sub

Dim Cll As Range, Temp As String On Error Resume Next If Selection.MergeCells = False Then For Each Cll In Selection If Cll <> "" Then Temp = Temp + Cll.Text + "" Next Cll Selection.Merge Selection.Value = Left (Temp, Len (Temp) - 1) Else Selection.UnMerge End If Selection.HorizontalAlignment = xlCenter Selection.VerticalAlignment = xlCenter 

Remember to enter the correct code above, if you want to combine the cells that have one line per data, you change the code line

If Cll <> "" Then Temp = Temp + Cll.Text + "" becomes

If Cll <> "" Then Temp = Temp + Cll.Text + vbCrLf

After entering you select Run -> Continue ( F5 key ).

How to split cells, combine cells in Excel Picture 8

A message appears, select OK , then turn off Visual Basic and see the results.

How to split cells, combine cells in Excel Picture 9

HOW TO DIFFER CellS IN EXCEL

Method 1: Split cells after merging cells

Step 1: Select the merged cells you want to split.

How to split cells, combine cells in Excel Picture 10

Step 2 : Select the Home tab , click Merge & Center to uncheck the merging box.

How to split cells, combine cells in Excel Picture 11

The merged cells will then be split and the contents of the merged cells will be moved to the first upper left cell.

How to split cells, combine cells in Excel Picture 12

Method 2: Split 1 cell into two cells

Step 1 : In Excel worksheet, select the cell you want to split, right-click the cell and select Format Cells.

How to split cells, combine cells in Excel Picture 13

Step 2 : The Format Cells dialog box appears , select the Border tab . In the Border you have two options diagonal style: (1) diagonal from the bottom up or (2) diagonal from the top down. Then click OK to split the cell you choose.

How to split cells, combine cells in Excel Picture 14

So the cell you selected has been split in two by diagonal lines.

How to split cells, combine cells in Excel Picture 15

Step 3 : Enter data for the two cross cells.

Put the mouse in the cell and enter data for the upper diagonal box then press Alt + Enter to enter the line and enter the data for the lower diagonal.

How to split cells, combine cells in Excel Picture 16

Then you put your mouse on the data above, press the space bar ( Space ) and move the data into the correct middle box above. Similarly, you press the space and move the data below.

How to split cells, combine cells in Excel Picture 17

So you have the following results:

How to split cells, combine cells in Excel Picture 18

Good luck!

5 ★ | 1 Vote

May be interested

  • How to rotate any 1 page size paper in WordPhoto of How to rotate any 1 page size paper in Word
    instructions on how to convert a single page to horizontal paper size, the remaining pages remain the default vertical format in word. the default in text editing often to paper vertical size. however, the case of combined reports that exceeds the required length of vertical paper
  • How to edit PDF files with Word 2016Photo of How to edit PDF files with Word 2016
    how to edit pdf files with word 2016. previously, to edit pdf files we need specialized pdf processing software, but word 2016 and onwards has built-in very powerful pdf editing function, if if you do not know this feature then follow up
  • How to draw mind maps using PowerPointPhoto of How to draw mind maps using PowerPoint
    how to draw mind maps using powerpoint. similar to drawing a mind map with word, with powerpoint you can also use tools to draw shapes and lines to be able to draw a simple mind map.
  • How to draw mind maps with WordPhoto of How to draw mind maps with Word
    how to draw mind maps with word. if you want to draw a simple mind map without installing additional professional mind mapping software, you can use the microsoft office word application directly.
  • Summary of Excel exercises from basic to advancedPhoto of Summary of Excel exercises from basic to advanced
    below summarizes the excel exercises from basic to advanced, you can refer to the solution to know how to use functions and how to apply functions to each specific problem. you will improve your excel skills with excel exercises from beginner to n
  • How to delete blank lines (blank lines) in WordPhoto of How to delete blank lines (blank lines) in Word
    how to delete blank lines (blank lines) in word. the following article shows you how to delete extra white lines (blank lines) in word quickly.