How can I copy values from one cell in a column down to the next c

G

Guest

How can I copy values from one cell in a column down to the next cell IF the
2nd cell is blank, For example:

A1 = 20
B1 =

I want the value of A1 to be copied to B1 if B1 is blank/contains a value of
Null, I have about 11,000 records like this, where: If the next cell in the
column is blank, then I need to copy the previous cells data into that cell.
 
G

Guest

2 ways:
Easiest-If you click on A1 you should see a plus sign showing in the border
at the bottom right. Click on that plus sign and hold down the mouse button
while dragging down.

Or-If the cell value increases by 1 at each row, then simply copy A1,
highlight (click on next cell and drag down) and then select copy.
 
P

Paul Black

Hi GSingh,

In Cell "C1" for Example Enter the Formula :-
=IF(B1="",A1,IF(B1=0,A1,0))

All the Best.
Paul
 
G

Gord Dibben

You are mixing columns and rows I believe.

Column A would be A1, A2, A3 etc.

Row 1 would be A1, B1, C1 etc.

Select the column or row.

Hit F5>Special>Blanks.

With these selected, enter an = sign in active cell then point to cell above
or to left and hit CRTL + ENTER.

Copy the column or row and in place Edit>Paste Special>Values>OK>Esc.


Gord Dibben Excel MVP
 
P

Paul Black

Hi Again GSingh,

You could Also Enter in "C1" the Formula :-
=IF(OR(B1="",B1=0),A1)

All the Best.
Paul
 
G

Guest

Im sorry, I really meant:

How can I copy values from one cell in a column down to the next cell IF the
2nd cell is blank, For example:

B1 = 20
B2 =

I want the value of B1 to be copied to B2 if B2 is blank/contains a value of
Null, I have about 11,000 records like this, where: If the next cell in the
column is blank, then I need to copy the previous cells data into that cell.
 
P

Paul Black

Hi GSingh,

You could Use Column "B" JUST as your Input Column.
You could then Insert the Following Formula into Cell "C2" ...
=IF(OR(B2="",B2=0,B1),B2)
.... and Copy it Down.
Therefore Column "C" will be the Results Column you are After.

Hope this Helps.
All the Best.
Paul
 
P

Paul Black

Hi GSingh,

You could Use Column "B" JUST as your Input Column.
You could then Insert the Following Formula into Cell "C2" ...
=IF(OR(B1="",B1=0,B1)*IF(B2="",B2=0),C1,B2)
.... and Copy it Down.
Therefore Column "C" will be the Results Column you are After.

Hope this Helps.
All the Best.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top