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: 6
Default Excel Change Text to Date

I am opening a comma-delimited CSV file using:

Workbooks.OpenText FileName:="InFile.csv", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True,
Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1,
IsText), _
Array(2, IsText), Array(3, IsText), Array(4, IsText), Array(5, IsText), _
Array(6, IsText), Array(7, IsText), Array(8, IsText), Array(9,
IsText)), _
TrailingMinusNumbers:=True

One row has the text "5-10" in column H. No matter what I do Excel is
determined to convert that cell to "10-May" and it changes the datatype for
that cell to "Date".

I would hate to have to "dump" Excel and go to pire VB for this project.

Anyone have any ideas how to stop Excel from converting text to date?
 
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
CHANGE TEXT DATE TO NUMERIC DATE slf Excel Worksheet Functions 5 January 5th 10 10:20 AM
how do i change text format date to date (i.e., mm/yy to mm/dd/yyy lindsey Excel Discussion (Misc queries) 1 July 27th 07 10:05 PM
Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS! PSSSD Excel Worksheet Functions 2 August 8th 06 09:31 PM
Change text color of specific date range by macro in Excel Morgan LeFay Excel Programming 1 August 3rd 06 07:51 PM
Change text to date and check against date in cell RW Excel Programming 3 February 2nd 06 03:29 PM


All times are GMT +1. The time now is 08:20 AM.

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

About Us

"It's about Microsoft Excel"