Office 2010 - Excel

Lesson 31: “Tables” (4)

31/87 Lessons 

Merging Cell Content

To merge cells, we use a “Formula”. I have not yet talked about “Formulas”, but don’t worry. It is not difficult.

In this example, the first thing we do is add a column. It is in this column D that we will have the merging content of, if necessary, two cells.

We place the cursor in cell D4 and type the following formula: =IF(C4=””,A4,A4&” “&B4)

Let me try to explain what this formula means:

  • Each “Formula” begins with an “equals” sign =
  • Next, we type IF(C4=”” which means If cell C4 equals nothing, nothing because there is nothing between the quotation marks, which is the case when our last name consists of only one word, Excel needs to consider the first argument or A4
  • Next we type a comma (,) followed by the first argument specifying to return the value of cell A4 when the condition is satisfied. This means that when cell C4 is empty, Excel will return the value of cell A4.
  • However, if the condition is not met, thus when cell C4 is not empty, then Excel needs to return the merged values of cells A4 and B4, separated by a space. This is identified by the&” “& code. The ampersand sign “&” means that something follows and the space we want between the two words is representated by the two quotation marks separated by a space ” “.

Click the Enter key on your keyboard, and the result appears in cell D4.

 

Next we copy this “Formula” to the other rows. The quickest way to do this is by double-clicking the little block at the bottom right of the selected cell (1).  As you can see in the picture below, the data of the two columns merged together if it were necessary.

Now that we have merged these two cells in different cell, we can separate the two cells. Or maybe not? No we cannot. The assembled cell D4, contains a “Formula” which takes its data from the cells A4 and B4.

So if you should remove data from one of these cells, there would be no data which could be picked up from these cells and thus no longer any data to be displayed. As an example, I deleted the data in cell A4, and you see immediately that the data in cell D4 is also adjusted.

S what do we do now?

The first thing we should do is to make values from all of the formulas in column D.

So, first select all the cells in column D that you want to convert to values.

Right-click the edge of the selected cells and drag the cursor to the right over the adjacent column (1) and without releasing the mouse button, drag it back to the original column (2). Release the mouse button and a menu will appear. Choose the options “Copy Here as Values Only” (3).

Now, you see that contents of these cells are changed to data and no longer contain formulas

The only thing which remains is to put the content of the various columns in the right position. You can do this by clicking and dragging. When that’s done, you can remove the excess columns.

This was not an easy lesson, especially since you’ve not learned anything about “Formulas”. If you understood this lesson, the rest of this course will be easy for you. In case you had difficulty, it might be best to read the lessons on “Formulas” first .

Awesome!
You've completed Lesson 31
START NEXT LESSON