excel vba to fill down column till first blank cell in another column

BORUCH

Well-known Member
Joined
Mar 1, 2016
Messages
528
Office Version
  1. 365
Platform
  1. Windows
hi

I'm looking for help with an excel vba that fills down column M from cell M26 till it finds the first empty cell in column A

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
An option

VBA Code:
Sub DoTheThing()

Dim rownum As Long
rownum = 26

Do Until Cells(rownum + 1, 1) = ""
    Cells(rownum, 13).Copy Cells(rownum + 1, 13)
    rownum = rownum + 1
Loop


End Sub
 
Upvote 0
Solution
Does this do what you want?

VBA Code:
Sub Fill_Down()
  Range("M26:M" & Range("A26").End(xlDown).Row).FillDown
End Sub
 
Upvote 0
An option

VBA Code:
Sub DoTheThing()

Dim rownum As Long
rownum = 26

Do Until Cells(rownum + 1, 1) = ""
    Cells(rownum, 13).Copy Cells(rownum + 1, 13)
    rownum = rownum + 1
Loop


End Sub
thanks very much
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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