LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Adding a date timestamp to the last column of a spreadsheet

I have a macro contained in a master spreadsheet which is used to
extract data from a spreadsheet selected by a user, the selected
spreadsheets are listed in the master spreadsheet containing the macro.


The macro opens the selected spreadsheet and formats the data (removes
unwanted cells, adds a header row and numbers it 1,2,3.......) and
outputs it to a csv file, this is then loaded into a sql server
database.

I need to add an update date field as the final field in the csv file,
therefore this should be appended to the final column of data in the
final csv file. I do not want to edit the original spreadsheet selected
by the user.

The final column of data varies between user spreadsheets but I am
identifying what is the final column and inserting a header row up to
the final column using the code:

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

Can I do something like LastCol+1 needs to be autofill with a date
timestamp?

Fairly new to this so excuse my ignorance?

Thanks
Steve

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating a timestamp as a date and time. Dan Excel Worksheet Functions 3 April 20th 07 05:38 PM
Converting UTC timestamp value to date and time SK Excel Discussion (Misc queries) 1 March 19th 07 02:40 AM
insert date timestamp to end of spreadsheet [email protected] Excel Programming 0 August 8th 06 05:24 PM
Remove Timestamp from date [email protected] Excel Programming 3 August 7th 06 08:43 AM
Convert Date Time in Spreadsheet Column to Date only Genga Excel Programming 1 June 8th 04 08:18 PM


All times are GMT +1. The time now is 06:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"