Populate to Last row - Simplify copy

Ananthak275

Board Regular
Joined
Aug 22, 2020
Messages
128
Office Version
  1. 2013
Platform
  1. Windows
  2. MacOS
Hey everyone,
My code goes into Column A, starts at row 2 and populates the values based on the last row in Column L.
1. I'm trying to make so instead of column B, it looks for the last row in the sheet, rather than a specific column.
2. Also is there a way to simplify it?

Populate_Column = "A"
DataStartRow = 2
LastRowColumn = “B"

Range(Populate_Column & DataStartRow).Select
Selection.NumberFormat = "[$-F800]dddd, mmmm dd, yyyy"
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.NumberFormat = "yyyy/mm"
Selection.AutoFill Destination:=Range(Populate_Column & DataStartRow & ":" & Populate_Column & Range(LastRowColumn & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
 
What data & is it only your "RelatedColumn" that needs to be filled?
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,784
Messages
6,121,538
Members
449,038
Latest member
Guest1337

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