What's wrong with my code?

dping222

New Member
Joined
Apr 7, 2002
Messages
3
Hi guys,

Range("B1").Select
again:
Selection.Copy
ActiveCell.Offset(1, 0).Select

While ActiveCell.Value = Null
ActiveCell.PasteSpecial xlPasteValues
ActiveCell.Offset(1, 0).Select
Wend

GoTo again

I'm basically trying to evaluate the cells in a column and do a FillDown on the empty cells. The column may look like the following:

11111
blank
blank
22234
blank
38288
blank
blank
blank

so on and so on. The blanks would be filled in with the closest number above the blank.

Any help is appreciated!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
On Error Resume Next
With Range("B1:B20").SpecialCells(xlCellTypeBlanks) 'change range as required
.FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
On Error GoTo 0
This message was edited by fght on 2002-04-09 15:19
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,978
Members
448,934
Latest member
audette89

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