Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing worksheet cells from within a function | Setting up and Configuration of Excel | |||
Date & Time | New Users to Excel | |||
Hyperlinks using R[1]C[1] and offset function in its cell referenc | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |