close

I have a BIG list of text dates I need converted to date format.
You cannot use =date(A1)

A b c
2005,12,32 =quot;date(quot;amp;A1amp;quot;)quot; =date(2005,12,32)

I enter the formula into column B and it displays a date formula
I copy B and paste special - values into C and it looks as above.
If I select C and hit enter, the formula caclulates and I get 12/32/2005
The problem is I have 7000 more cells to calculate. I have tried F9 and also
closing the file and reopening and it won't calculate the remaining cell.

Any help would be appreciated.

if all the dates are yyyy,mm,dd you can use the following date formula in a
single cell:

=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,6,2)),VALUE(R IGHT(A1,2)))
DATE(Year, Month, DAY)
The LEFT function extracts the first 4 characters from the string and VALUE
converts them to a value giving you the year.

MID extracts 2 characters starting at position 6 and Value converts it to a
number for the month.

RIGHT extracts the last 2 characters on the right, and VALUE converts it to
a number for the day.

--
Kevin Backmannquot;tngquot; wrote:

gt; I have a BIG list of text dates I need converted to date format.
gt; You cannot use =date(A1)
gt;
gt; A b c
gt; 2005,12,32 =quot;date(quot;amp;A1amp;quot;)quot; =date(2005,12,32)
gt;
gt; I enter the formula into column B and it displays a date formula
gt; I copy B and paste special - values into C and it looks as above.
gt; If I select C and hit enter, the formula caclulates and I get 12/32/2005
gt; The problem is I have 7000 more cells to calculate. I have tried F9 and also
gt; closing the file and reopening and it won't calculate the remaining cell.
gt;
gt; Any help would be appreciated.


Again, if all the dates are in the same format then you could also use
this,

=VALUE(TEXT(SUBSTITUTE(A14,quot;,quot;,quot;/quot;),quot;yyyy/mm/ddquot;))Copy down your list of text dates. You can change the format as you
want by changing the quot;yyyy/mm/ddquot; to another date format.

HTH

Steve--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=513838one way
Sub makedate()
On Error Resume Next
lr = Cells(Rows.Count, quot;aquot;).End(xlUp).Row
For Each c In Range(quot;a2:aquot; amp; lr)
x = Left(c, 4)
y = InStr(1, c, quot;,quot;)
z = InStr(y 1, c, quot;,quot;)
c.Value = DateSerial(x, Mid(c, y 1, z - y), Right(c, Len(c) - z))
Next
End Sub

--
Don Guillett
SalesAid Software

quot;tngquot; gt; wrote in message
...
gt;I have a BIG list of text dates I need converted to date format.
gt; You cannot use =date(A1)
gt;
gt; A b c
gt; 2005,12,32 =quot;date(quot;amp;A1amp;quot;)quot; =date(2005,12,32)
gt;
gt; I enter the formula into column B and it displays a date formula
gt; I copy B and paste special - values into C and it looks as above.
gt; If I select C and hit enter, the formula caclulates and I get 12/32/2005
gt; The problem is I have 7000 more cells to calculate. I have tried F9 and
gt; also
gt; closing the file and reopening and it won't calculate the remaining cell.
gt;
gt; Any help would be appreciated.
The 32nd of December????

Maybe you could just select that single column and do data|text to columns.

Choose fixed width and don't draw any lines.
Choose ymd as the format
and finish up.

Format it the way you like.

tng wrote:
gt;
gt; I have a BIG list of text dates I need converted to date format.
gt; You cannot use =date(A1)
gt;
gt; A b c
gt; 2005,12,32 =quot;date(quot;amp;A1amp;quot;)quot; =date(2005,12,32)
gt;
gt; I enter the formula into column B and it displays a date formula
gt; I copy B and paste special - values into C and it looks as above.
gt; If I select C and hit enter, the formula caclulates and I get 12/32/2005
gt; The problem is I have 7000 more cells to calculate. I have tried F9 and also
gt; closing the file and reopening and it won't calculate the remaining cell.
gt;
gt; Any help would be appreciated.

--

Dave Peterson

Kevin B's solution resolved my conversion, Thanks.

I still wonder why the cell showed =date(2005,12,32) and would only
calculate when I selected the cell and hit enter.

Folks, Thanks for your feedback.

Tom

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()