PC Review


Reply
Thread Tools Rate Thread

Dates shown as text - how to convert

 
 
Colleyville Alan
Guest
Posts: n/a
 
      9th Nov 2003
When I use the trim function on some dates that have been input as text, the
leading spaces are gone. But Excel still treats the dates as though they
were text

However, if I hit the F2 key to enter the edit mode and then press Enter, it
converts the information to dates. How do I convert thess quasi-text cells
without manually editing each one? Is there a worksheet function that will
do this?
Thanks


 
Reply With Quote
 
 
 
 
Anders S
Guest
Posts: n/a
 
      9th Nov 2003
Try this:

- copy any empty cell
- select the problem cells
- do Edit>Paste Special, click Add, then OK
- do Format>Cells>Date

HTH
Anders Silvén

"Colleyville Alan" <(E-Mail Removed)> skrev i meddelandet news:n6zrb.114821$275.325750@attbi_s53...
> When I use the trim function on some dates that have been input as text, the
> leading spaces are gone. But Excel still treats the dates as though they
> were text
>
> However, if I hit the F2 key to enter the edit mode and then press Enter, it
> converts the information to dates. How do I convert thess quasi-text cells
> without manually editing each one? Is there a worksheet function that will
> do this?
> Thanks
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      9th Nov 2003
try this

Sub ConvertThem() 'Harald Staff
Dim C As Range
For Each C In Intersect(Selection, _
ActiveSheet.UsedRange)
If Not C.HasFormula Then
If IsNumeric(C.Value) Then
C.Value = C.Value * 1
End If
End If
Next
End Sub
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Colleyville Alan" <(E-Mail Removed)> wrote in message
news:n6zrb.114821$275.325750@attbi_s53...
> When I use the trim function on some dates that have been input as text,

the
> leading spaces are gone. But Excel still treats the dates as though they
> were text
>
> However, if I hit the F2 key to enter the edit mode and then press Enter,

it
> converts the information to dates. How do I convert thess quasi-text

cells
> without manually editing each one? Is there a worksheet function that

will
> do this?
> Thanks
>
>



 
Reply With Quote
 
Colleyville Alan
Guest
Posts: n/a
 
      10th Nov 2003
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> try this
>
> Sub ConvertThem() 'Harald Staff
> Dim C As Range
> For Each C In Intersect(Selection, _
> ActiveSheet.UsedRange)
> If Not C.HasFormula Then
> If IsNumeric(C.Value) Then
> C.Value = C.Value * 1
> End If
> End If
> Next
> End Sub


This code works fine for numeric values that Excel thinks are strings, but
it does not seem to work on dates.


 
Reply With Quote
 
Colleyville Alan
Guest
Posts: n/a
 
      10th Nov 2003

"Anders S" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
Try this:

- copy any empty cell
- select the problem cells
- do Edit>Paste Special, click Add, then OK
- do Format>Cells>Date

Thanks - works great.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert 29.08 hours (shown in decimal form) to time shown in "hh:m Nila in Florida Microsoft Excel Worksheet Functions 1 14th Sep 2008 01:35 AM
How do I convert dates stored as dates to text? =?Utf-8?B?ZGlhbXVuZHM=?= Microsoft Excel Misc 5 7th Sep 2007 05:38 PM
convert dates stored as text to dates =?Utf-8?B?bGVua28=?= Microsoft Excel Programming 2 5th Dec 2004 06:30 PM
Convert text to dates Ket Microsoft Excel Worksheet Functions 5 4th Nov 2004 08:03 PM
convert text to dates Sandra Microsoft Access 1 24th Oct 2003 05:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:53 AM.