Copy Values to empty cell below filled cells in selection

  • Thread starter Thread starter Harn88
  • Start date Start date
H

Harn88

Hello

Please help me. I need a macro that will copy values to empty cell below
filled cells in selection.

Before After
110.03 3.23 110.03 3.23
116.01 116.01 3.23
125.02 125.02 3.23
155.01 155.01 3.23
155.05 155.05 3.23
155.06 155.06 3.23
167.01 167.01 3.23
169.01 169.01 3.23
176.01 176.01 3.23
181.01 181.01 3.23
181.02 181.02 3.23
182.01 182.01 3.23
184.01 184.01 3.23
116.01 4.2 116.01 4.2
125.02 125.02 4.2
135.03 135.03 4.2
155.01 155.01 4.2
155.05 155.05 4.2
155.06 155.06 4.2
162.01 162.01 4.2
169.01 169.01 4.2
176.01 176.01 4.2
176.02 176.02 4.2
181.01 181.01 4.2
100.01 5.24 100.01 5.24
116.01 116.01 5.24
116.02 116.02 5.24
125.02 125.02 5.24
147.01 147.01 5.24
155.01 155.01 5.24
155.04 155.04 5.24
155.05 155.05 5.24
155.06 155.06 5.24
162.01 162.01 5.24
167.01 167.01 5.24
169.01 169.01 5.24
176.01 176.01 5.24

Thank you very much

Best regards,

Harn
 
Let's say values in ColumnC are filled in and you want to fill in values in
ColumnD:
Sub FillEmpties()
Dim lastrow As Long
lastrow = ActiveSheet.Cells(Rows.Count, "C").End(xlUp).Row
Range("D2:D" & lastrow).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub

Also:
http://www.contextures.com/xlDataEntry02.html

HTH,
Ryan---
 

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

Back
Top