 chris-red Have you considered a TDM?

Joined: 21 Sep 2005 Karma :   
|
 Posted: 17:14 - 31 Aug 2010 Post subject: Macro type thing help |
 |
|
Following on from this thread
https://www.bikechatforums.com/viewtopic.php?t=203649&highlight=macro
I need to create a macro or something that will convert a column of dates into a different format
I tried to do it in Excel (see the thread) but it kept dropping leading 0's.
So have given up on Excel, are there other ways?
Ideally I'd copy and paste a column of dates press a button and get the same column of dates with the translated date next to it.
The date change is from 31/08/2010 - 1100831
DD/MM/YYYY to YYYMMDD
2010 becomes 110
1999 becomes 099
2110 becomes 210
etc. etc.
Anyone have any ideas? ____________________ Well, you know what they say. If you want to save the world, you have to push a few old ladies down the stairs.
Skudd:- Perhaps she just thinks you are a window licker and is being nice just in case she becomes another Jill Dando.
WANTED:- Fujinon (Fuji) M42 (Screw on) lenses, let me know if you have anything. |
|
 The Shaggy D.A. Super Spammer

Joined: 12 Sep 2008 Karma :  
|
 Posted: 17:47 - 31 Aug 2010 Post subject: |
 |
|
Missed the other thread, but aren't you just subtracting 1900 from the year? You could just have a cell next to the date that slices it, formats it, then concatenates the fields back together in the order you want :-
=CONCATENATE(TEXT((YEAR(A1)-1900),"000"),TEXT(MONTH(A1),"00"),TEXT(DAY(A1),"00"))
Where A1 is the cell with the date in it. ____________________ Chances are quite high you are not in my Monkeysphere, and I don't care about you. Don't take it personally.
Currently : Royal Enfield 350 Meteor
Previously : CB100N > CB250RS > XJ900F > GT550 > GPZ750R/1000RX > AJS M16 > R100RT > Bullet 500 > CB500 > LS650P > Bullet Electra X & YBR125 > Bullet 350 "Superstar" & YBR125 Custom > Royal Enfield Classic 500 Despatch Limited Edition (28 of 200) & CB Two-Fifty Nighthawk > ER5 |
|
 chris-red Have you considered a TDM?

Joined: 21 Sep 2005 Karma :   
|
 Posted: 19:05 - 31 Aug 2010 Post subject: |
 |
|
| The Shaggy D.A. wrote: | Missed the other thread, but aren't you just subtracting 1900 from the year? You could just have a cell next to the date that slices it, formats it, then concatenates the fields back together in the order you want :-
=CONCATENATE(TEXT((YEAR(A1)-1900),"000"),TEXT(MONTH(A1),"00"),TEXT(DAY(A1),"00"))
Where A1 is the cell with the date in it. |
Love you  ____________________ Well, you know what they say. If you want to save the world, you have to push a few old ladies down the stairs.
Skudd:- Perhaps she just thinks you are a window licker and is being nice just in case she becomes another Jill Dando.
WANTED:- Fujinon (Fuji) M42 (Screw on) lenses, let me know if you have anything. |
|
 Frost World Chat Champion

Joined: 26 May 2004 Karma :  
|
|