I've created a column of 500+ dates that all read "mm/dd". They are 2012 dates, but I'd like to change them all to 2010 dates. Any ideas?
I've created a column of 500+ dates that all read "mm/dd". They are 2012 dates, but I'd like to change them all to 2010 dates. Any ideas?
Last edited by darpodo; 02-29-2012 at 12:55 PM.
If they're true dates, you should be able to just do a global replace (Replace All) changing 2012 to 2010
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Ctrl+F > Then find 2012 replace with 2010
Do a Find...Replace changing 2012 for 2010.
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
I guess that's agreed then ...
And three answers all with the same time stamp within 5 minutes!
Try
=IF(A1> "2/28/2012"+0, A1-731, A1-730)
If you have a 2012 date of 02/29 it will become 02/28/2010
Does that work for you?
Edit: Making it more complicated than necessary as usual.
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
@ChemistB: overcomplicated, yes ... correct, also yes.
The solutions provided using a global change will work, or appear to work, for all dates. However, any dates for 29/02/2012 will change to 29/02/2010 and will be a text value, not a true date.
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks