![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,679
|
Kristy has gone brain-dead today.
I have a spreadsheet which I need to get information from to make a chart. To get this information, I need the dates. The dates have unfortunately been entered as integers (20020313). I would like to enter slashes into the cell so that when formatted, the date will appear as 3/13/2002. I tried recording a macro to do this, but it just enters the same numbers into the cells, which is definately not wanted, and I got lost from there. I don't really feel like doing this by hand, since this needs to be done on the entire column, which is around 300 cells. I would just like to have it start at the beginning of the cell, move the cursor to the right 4 spaces, enter /, move to the right 2 spaces, and enter /. Just so it's noted, I have tried the search link, but couldn't come up with what I wanted, and I am using XL 2000. Any ideas? Thanks, _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-15 11:37 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Kristy,
What about the formula: =RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4) Eli [ This Message was edited by: eliW on 2002-05-15 08:20 ] |
|
|
|
|
|
#3 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,679
|
Thanks, eli.
While that does give me the desired result (after moving a couple bits of it around so it's not in European date format), I have to enter it in a different cell to get it to work. I guess I was looking for something that I could set up to go into each cell and do that without having to rely on a new cell. That is what I was attempting to do when I recorded the macro, but I just can't get it to work for the life of me. _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-15 09:21 ] |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Select your values and choose the Data | Text to Columns... menu command. Press [ Next> ] twice to get to Step 3 of 3. Choose the Date: YMD format and press [ Finish ]. Format the resultant date value as desired.
|
|
|
|
|
|
#5 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,679
|
Thanks, Mark. I just found that out before I came back here.
Told ya I went brain dead! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|