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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,215,420
Messages
6,124,802
Members
449,190
Latest member
cindykay

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