Euro5
asked on
VBA copy down today's date
Using this VBA code, I want to add today's date to column U along with the fill in columns V & W.
Can anyone help? Thank you! :)
Can anyone help? Thank you! :)
Sub CopyFormulaDownfar()
Dim LastPopulatedRow As Long
Worksheets("FAR All").Activate
'Find last populated row
LastPopulatedRow = Range("A" & Rows.Count).End(xlUp).Row
'Select the rows where formula is to be populated
Range("V2: " & "V" & LastPopulatedRow).FillDown
Range("W2: " & "W" & LastPopulatedRow).FillDown
I believe =Today() in the cell will get this done for you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bembi & Andrew -
Now()
Today()
Date
All show time - can I just get the short date? 5/17/2021
Now()
Today()
Date
All show time - can I just get the short date? 5/17/2021
Range("...").value = Format$(now(), "DD-MM-YYYY") or similar.
There are also built in variables to use the computer format, I guess "short date"
The other option is just to format the cell...
Range("...").NumberFormat = "DD-MM-YYYY"
The first option writes only the date into the cell, but no time.
The second option would format the ceell to show the date, even the cell contains also the time.
There are also built in variables to use the computer format, I guess "short date"
The other option is just to format the cell...
Range("...").NumberFormat = "DD-MM-YYYY"
The first option writes only the date into the cell, but no time.
The second option would format the ceell to show the date, even the cell contains also the time.