# Excel add data to beginning of cell if adjacent cell (to the right) is empty

#### JONPM

##### New Member
Hi,

Is there a formula I could use which would:

Add data at the beginning of each cell in the left column if and only if the adjacent cell (to the right) is empty.

?? Really struggling with this.

Many thanks,
J

### Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
this is assuming that you are useing columns ABCd
A and b being what you want to add, and c being the blank cell, d being where you enter the formula.
=if(c1="",sum(b1:a1),"")
 2 3 1 2 3 2 2 3 3 2 3 5 2 3 5 2 3 4 2 3 3 2 3 5 2 3 5

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

this is what I came up with

You can't 'Add' to a cell, that'd make an endless loop referencing itself.

In a third column (Col C), use this (Assuming that col A is your 'Left' column, and B is your 'Right' Column)

Obviously, change for the correct columns, and either replace 'Added Data' with something else, or a cell reference instead.

I'll try to be more specific.

By 'Add' I mean add to the data in each cell in column B by using a formula which puts the data in (in this case "b.") to all the cells in column B ONLY if there is an adjacent (to the right) blank cell in column C.

 2 3 2 3 b.2 2 3 b.2 2 3 2 3 2 3 2 3

<tbody>
</tbody>

basically to put a letter b. into the cells in column B which occur adjacent to blank cells in column C

Thanks — been working on this all day and driving me crazy!!

dates are saved as numbers in excel, if you add the date and a number you are going to get a different date

So there is no way of using a formula to put data (in this case the letter b.) into a cell which has numbers in it based upon the adjacent cells content?

before:

 1930 2006 1956 2004 1920 1918 1987 1904 1990 1970 1968 1942 1999 1870 1934

<tbody>
</tbody>

after formula:

 1930 2006 1956 2004 b.1920 1918 1987 1904 1990 b.1970 b.1968 1942 1999 1870 1934

<tbody>
</tbody>

closet I've come is (based upon above example):

="b."&B1:B9(IF(ISBLANK(B1:B9),C1:C9,0))

but this doesn't work :/

Replies
8
Views
243
Replies
9
Views
257
Replies
9
Views
275
Replies
5
Views
185
Replies
7
Views
225

1,203,621
Messages
6,056,337
Members
444,861
Latest member
B4you_Andrea

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back