Copy to only blank cells

hemsleysut

Board Regular
Joined
Jul 29, 2002
Messages
124
Anyone suggest the simplest method of copying the contents of a cell to the blank cells directly beneath it until you come to another entry and then copy that entry to the cells directly beneath that, and so on. The cell entries can be anywhere within column A ie. they do the populate column A in a regular fashion. For example, I want to go from:
A1:Red
A2:no entry
A3:no entry
A4:Brown
A5:no entry
A6:Yellow
A7:no entry
A8:no entry

to:
A1:Red
A2:Red
A3:Red
A4:Brown
A5:Brown
A6:Yellow
A7:Yellow
A8:Yellow
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,222
If your data really is that way, with a value in cell A1 and nothing in A2, then click on the "A" of the column A header to select all of column A. Next, click on Edit > GoTo > Special > Blanks > OK. Then, enter
=A1
and press Ctrl+Enter.

Copy column A and paste special it for values.



VBA approach if you are interested, though not needed if it's a one-time thing:

Sub Test1()
With Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
.SpecialCells(4).Formula = "=R[-1]C"
.Value = .Value
End With
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,380
Messages
5,571,796
Members
412,419
Latest member
acemali
Top