![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Mar 2002
Posts: 5
|
I have created a custom cell format that allows me to enter a date without entering in the dash. Here is the format 00"-"00"-"00. It works just fine however I've discovered that when I sort the various dates it does not sort them in a to z order like it should. What gives???
[ This Message was edited by: ylittlejohn on 2002-05-09 13:30 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
If you are entering the dates as mm-dd-yy, it won't work, because it is sorting first by month, then by day and finally by year. You have to enter as yy-mm-dd.
Why not just use one of the standard date formats?
__________________
Barry- Photo Restoration/Enhancement http://www.smiledogproductions.com click below for detour
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
[ This Message was edited by: Mark W. on 2002-05-09 14:52 ] |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
Right, Mark. I guess what I meant to say was to use a date format and enter as a date, with the slashes.
__________________
Barry- Photo Restoration/Enhancement http://www.smiledogproductions.com click below for detour
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
So if you have entered a six digit number (as you did), substance wise you have entered six digits ... based on the US customary representation, you may have entered in cell A1 mmddyy ... never mind that you see this representation as a date ... it is not a date to Excel So if you want to get the setup mmddyy as a date, one of the ways would be to use the following formula ... =date(right(a1,2),left(a1,2),mid(a1,3,2)) Regards! _________________ Yogi Anand Edit: Deleted inactive web site reference from hard code signature line [ This Message was edited by: Yogi Anand on 2003-01-19 17:20 ] |
|
|
|
|
|
|
#7 | ||
|
New Member
Join Date: Mar 2002
Posts: 5
|
Thank you all for the help.
Quote:
|
||
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|