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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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
Back
Top