VBA CODE TO FIND LAST CELL AND FILL FORMULA IN NEXT COLUMN UPTO END.

SAQIBN

New Member
Joined
Oct 16, 2021
Messages
20
Office Version
  1. 2013
Platform
  1. Windows
Dear All,
I want a VBA Solution for following please.

I have a data list in A2:A200, (It will Change Every time), and a Formula in B1.

I want to find last Filled Cell from Column A, (i.e A200)
and to Copy Formula From B1 in B2:B200.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try this:
VBA Code:
Sub Test()
Range("B1").AutoFill Destination:=Range("B1:B" & Range("A" & Rows.Count).End(xlUp).Row)
End Sub
OR
VBA Code:
Sub Test()
Range("B1:B" & Range("A" & Rows.Count).End(xlUp).Row).FillDown
End Sub
 
Upvote 0
Solution
Try this:
VBA Code:
Sub Test()
Range("B1").AutoFill Destination:=Range("B1:B" & Range("A" & Rows.Count).End(xlUp).Row)
End Sub
OR
VBA Code:
Sub Test()
Range("B1:B" & Range("A" & Rows.Count).End(xlUp).Row).FillDown
End Sub

OMG.... Thanks you soooooooooooo much......
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,513
Members
449,168
Latest member
CheerfulWalker

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