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 Q TextToColumns

Hi

I'm converting text to date cells using a combination of NumberFormat and
TextToColumn calls.

However, certain values are not being converted and are remaining, I think,
as text

For example

' ---- format each date column as date
For l_nCol = 1 To .Cols
If .IsDate(l_nCol) Then

' .Format contains formats e.g. mm/yy, dd-mmm-yyyy for
each column

l_oSheet.Columns(l_nCol).NumberFormat = .Format(l_nCol)
l_oSheet.Columns(l_nCol).TextToColumns
FieldInfo:=Array(1, 4)

End If
Next l_nCol

06/10/1998 gets correctly formatted to 06/Oct/1998
but
27/03/1998 doesn't get formatted and remains as it is as text (it is left
justified, whereas converted date values are right justified)

Can someone please explain where I'm going wrong ...

Many thanks

Simon


 
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
What does TrailingMinusNumbers do in the TextToColumns Method Lennard van Putten Charts and Charting in Excel 3 August 5th 05 11:59 PM
texttocolumns Doug Broad[_4_] Excel Programming 4 April 21st 04 02:50 AM
TextToColumns Randy Reese Excel Programming 2 February 24th 04 07:44 PM
TextToColumns Dialog Howie[_3_] Excel Programming 1 October 28th 03 09:22 PM


All times are GMT +1. The time now is 04:04 PM.

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"