AutoFill Blank cells with closest above data

raynerfredrick

New Member
Joined
Jul 25, 2018
Messages
4
Looking for a to solution to pull data down into blank cells below until no blank cells remain. I could obviously just grab each cell and complete this but I've got 600 unique data pieces with varying numbers of blank cells below which need to be filled. Thanks so much.[TABLE="class: outer_border, width: 100"]
<tbody>[TR]
[TD]AutoZone
[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Bridgestone[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]American Can[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Primrose Bank[/TD]
[/TR]
[TR]
[TD]Johns Hopkins[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Community Maverick[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]First Exchange[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Manual suggestion:

- First blank cell (pretend it's A3) enter formula: =A2
- Copy A3
- Select column A, press F5, click Special, select Blanks then ok
- Paste
- Select Column A, copy and paste values over it

Code:
Code:
Sub Fill()
Dim x As Long
x = Range("A" & Rows.Count).End(xlUp).Row
With Range("A1").Resize(x)
  .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
  .Value = .Value
End With
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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