insert date timestamp to end of spreadsheet

S

sjharri

I am trying to insert a date timestamp as the last column of a
spredsheet before exporting it to csv. The column will vary between the
different files loaded.

The macro currently determines which is the last column and adds a
numbered row (for export purposes), code is:

If sId > 5 Then
LastCol = ActiveSheet.UsedRange.Columns.Count +
ActiveSheet.UsedRange.Column - 1
Rows("1:1").Insert shift:=xlDown
Range("A1").Select
ActiveCell.Value = 1
Selection.AutoFill Destination:=Range(Cells(1, 1), Cells(1,
LastCol)), Type:=xlFillSeries

Is there something I can add to the end of this which will basically
add a column to the end of the file and populate it with the date and
time?

Thanks
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top