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
 

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,270
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,998
Messages
5,834,808
Members
430,323
Latest member
Regash

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top