If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
I used xl2002 when I tested and it worked ok for me.
Ron Rosenfeld wrote: On Fri, 20 Aug 2004 14:57:42 -0700, Gord Dibben gorddibbATshawDOTca wrote: When I copied the data including underscore and sent it through T to T it changed the data to dates and deleted/ignored the underscore character automagically. Interesting. It did not do that here (Excel 2002). As a matter of fact, even with T to C and setting the underscore as a separator, only some of the entries were changed. --ron -- Dave Peterson |
#12
|
|||
|
|||
Thanks for your replies guys. I finally used Gord Dibben's solution
(DataText to ColumnsNextNext "column data format"DateDMYFinish.) which worked well. On a related theme... I still have a problem with some numbers imported as text from the same source. The cells are formatted General, and have 19 spaces after the last digit in each. I have tried several solutions to clean the data and convert it to a number with no success. Some of the solutions I've tried already: I have tried CLEAN, then using VALUE on the result to convert to a number, but this returns #VALUE! I have also tried find and replace on the spaces. I have also tried various macros recommended elsewhere. My thinking is that the spaces are in some way not normal. I attach a sheet with example data. Any comments appreciated. Attachment filename: egdata.xls Download attachment: http://www.excelforum.com/attachment.php?postid=655942 --- Message posted from http://www.ExcelForum.com/ |
#13
|
|||
|
|||
clay
This worked for me on your sheet. Sub NumFormat() Dim cel As Range On Error GoTo endit For Each cel In Selection cel.Value = cel.Value * 1 cel.numberformat = "0.00" Next cel Exit Sub endit: MsgBox "No cells found!" End Sub Gord Dibben Excel MVP On Sat, 21 Aug 2004 06:47:57 -0500, claytorm wrote: Thanks for your replies guys. I finally used Gord Dibben's solution (DataText to ColumnsNextNext "column data format"DateDMYFinish.) which worked well. On a related theme... I still have a problem with some numbers imported as text from the same source. The cells are formatted General, and have 19 spaces after the last digit in each. I have tried several solutions to clean the data and convert it to a number with no success. Some of the solutions I've tried already: I have tried CLEAN, then using VALUE on the result to convert to a number, but this returns #VALUE! I have also tried find and replace on the spaces. I have also tried various macros recommended elsewhere. My thinking is that the spaces are in some way not normal. I attach a sheet with example data. Any comments appreciated. Attachment filename: egdata.xls Download attachment: http://www.excelforum.com/attachment.php?postid=655942 --- Message posted from http://www.ExcelForum.com/ |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date Format | Steve McKenna | New Users | 0 | July 12th, 2004 01:18 PM |
when import EXCEL to ACCESS, the date format excel column title changed... | Amolin | General Discussion | 6 | June 25th, 2004 08:56 AM |
Unable to change date format | kd | Worksheet Functions | 2 | June 16th, 2004 05:57 PM |
Date format YYYYMMDD | John C. Das | General Discussion | 1 | June 15th, 2004 12:17 AM |
Formatting dates in Excel | bernrunner15 | New Users | 4 | May 11th, 2004 10:32 PM |