Autofill from one cell down to the next none empty cell on the same column Macro

ezpete

New Member
Joined
Sep 13, 2014
Messages
16
Hi all,
I'm trying to figure out the best way to accomplish autofilling from one cell in column A down to the next none empty cell in column A, I'm admitedly a bit of a novice with Macros but have been able to get by recording what i need to do. The issue is that the none empty cells in column A arent always in the same row, and the recorded Macros don't work as i had hoped.
I also need the autofill to stop running when it reaches the final row of column B.
ABC
35LOCATIONX
JACK
567LOCATIONX
JIMMY
SIMON
PAUL
4567LOCATIONX
AIDEN
RUTH
56889LOCATIONX
JEN
KAREN
VICKY
HELEN
BECKY
SIMON
4567TED

<tbody>
</tbody>

At present I have to do this manually and, as the locations in column B are contiunously being added to, is fast becoming very time consuming.

Help please!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try

Code:
Sub test()
Dim LR As Long
LR = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
With Range("A1:A" & LR)
    .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
    .Value = .Value
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,203,630
Messages
6,056,422
Members
444,863
Latest member
powerdt

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