parsing data into workbook
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » Parsing data into a workbook, date / time errors

Parsing data into a workbook, date / time errors

The UK's most regular instructor-led training courses.
Training information: excel one day course london · Excel courses london · VBA training UK

resolvedResolved · Low Priority · Version 2003

Parsing data into a workbook, date / time errors

Sarah has attended:
Excel VBA course

by - delegate Sarah [5 posts] (2008 May 15 Thu, 17:05) replyReply

Hi folks!

I'm designing a workbook which parses data from a comma separated (.csv) file into a new worksheet within the workbook then formats the sheet.

The code I have is mostly succesful at parsing the data, but unfortunately where I have two columns of date and time stamps eg. dd/mm/yyyy hh:mm:ss, they are copied across in US date format rather than U.K.
US date formats are mm/dd/yyyy hh:mm:ss.

The main problem with this is that the second date time stamp column may be in a different place depending on the data in the .csv file, so I can't tell the code to look in the same place and adjust the date with the DateSerial function.

How can I get the code to look at the type of data between each comma, determine it is a date, and parse it into the workbook in the correct U.K format?

Thanks for your help!


Excel Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Aug 28 Thu Southwark 0 FULL    
2002/XP 2008 Aug 29 Fri Tooting 0 FULL    
2003 2008 Sep 2 Tue Bloomsbury 4 book now £207 £215
2003 2008 Sep 4 Thu Bayswater 5 book now £195 £205
2007 2008 Sep 4 Thu Bloomsbury 0 FULL    
2003 2008 Sep 9 Tue Bloomsbury 4 book now £207 £215
Full Schedule: See all 139 Excel Intermediate course dates.
Bookings currently available until 25th November 2009.

RE: Parsing data into a workbook, date / time errors

by - delegate Sarah [5 posts] (2008 May 16 Fri, 11:17) replyReply

Never mind folks, I fixed it.

For anyone stuck doing something similar, here's my solution.

Instead of trying to write code to check the dates on parsing in the data I recorded a macro using Excel's 'Import External Data' function in the 'Tools' menu.

From there it was fairly easy to specify the filename as a separate variable and modify the code to work with my project. It seems ok importing the dates without modifying them to U.S format.

If you are fortunate to know which columns will always contain dates, you can specify them in the import wizard.

If anyone is working on a similar project and would like to see the code I used, please get in touch.


Related articles

· Identifying Suitable Candidates For VBA For Excel Training
· Microsoft Excel Features and Functions for Accountants
· Customized Financial Excel Courses in London
· A Beginners Guide To Formulas In Excel
· Do You Really Need Excel VBA Training?

Please browse our web site to find out more about
excel one day course london and other Microsoft training courses.

Excel tip:

Turn Function tooltips on and off

Excel 2002 (XP) and Excel 2003 have the Function tooltips facility. When you type in a function name followed by a bracket, for example, =IF(, a yellow box appears beside the function name and lists the function's arguments. This is very useful when you can't quite remember the order of a function's arguments or what the arguments actually are!

However, Function tooltips can become annoying. To turn them off, choose Tools|Options. and select the General tab. Then, untick the Function tooltips box and choose OK.

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz