#1   Report Post  
Posted to microsoft.public.excel.misc
tng
 
Posts: n/a
Default pasted function

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 ="date("&A1&")" =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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default pasted function

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 Backmann


"tng" wrote:

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 ="date("&A1&")" =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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default pasted function


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

=VALUE(TEXT(SUBSTITUTE(A14,",","/"),"yyyy/mm/dd"))


Copy down your list of text dates. You can change the format as you
want by changing the "yyyy/mm/dd" to another date format.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=513838

  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default pasted function

one way
Sub makedate()
On Error Resume Next
lr = Cells(Rows.Count, "a").End(xlUp).Row
For Each c In Range("a2:a" & lr)
x = Left(c, 4)
y = InStr(1, c, ",")
z = InStr(y + 1, c, ",")
c.Value = DateSerial(x, Mid(c, y + 1, z - y), Right(c, Len(c) - z))
Next
End Sub

--
Don Guillett
SalesAid Software

"tng" wrote in message
...
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 ="date("&A1&")" =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.



  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default pasted function

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:

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 ="date("&A1&")" =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.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
tng
 
Posts: n/a
Default pasted function

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
Reply
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
Changing worksheet cells from within a function James4U2enjoy Setting up and Configuration of Excel 1 October 14th 05 02:16 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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

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

About Us

"It's about Microsoft Excel"