Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Format Help

I have a field where I want the display to be in text, but when I sort, I
want to sort by date. Here's my dilema, though. I sometimes need to report
specific dates (Jan 13), but other times, just the month (Jan). Then, on
the sort, I want it to return them grouped together.

Currently I have a custom date format of 'mmm dd' so my display is 'Jan 13'.
When I just type in 'Jan', it automatically changes it to 'Jan 01' to match
my format...don't want that.

So, how can I get a format that will display 'Jan 13' or 'Jan' if it's just
a month (but still let me sort on that column so all the Jan's are together,
all the Feb's are together, etc.)

Thanks in Advance,
Dave


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Format Help

You need to use a helper column that identifies the numeric value of the
month

=Month(B3) in C3 for example.

Then sort on the column with this formula.

I am not sure how a format would decide when it is appropriate to display
Jan 01 vice Jan. In any event, conditional formatting in a format string is
very limited - it is really restricted to magnitude as a decision criteria.

Conditional formatting under the format menu does not control the number
format.

--
Regards,
Tom Ogilvy


"Dave "IT"" wrote in message
.. .
I have a field where I want the display to be in text, but when I sort, I
want to sort by date. Here's my dilema, though. I sometimes need to

report
specific dates (Jan 13), but other times, just the month (Jan). Then, on
the sort, I want it to return them grouped together.

Currently I have a custom date format of 'mmm dd' so my display is 'Jan

13'.
When I just type in 'Jan', it automatically changes it to 'Jan 01' to

match
my format...don't want that.

So, how can I get a format that will display 'Jan 13' or 'Jan' if it's

just
a month (but still let me sort on that column so all the Jan's are

together,
all the Feb's are together, etc.)

Thanks in Advance,
Dave




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Date Format Help

As far as I'm aware when you format a date eg 13-jan-2003
to dd-mmm, excel forgets or loses the year and replaces it
with the current system year (though not sure why yours is
2001).

I would say you could have a variable which is the full
date and reference that when sorting.
and possibly use the format or datepart functions to
display the other.

HTH
-----Original Message-----
I have a field where I want the display to be in text,

but when I sort, I
want to sort by date. Here's my dilema, though. I

sometimes need to report
specific dates (Jan 13), but other times, just the month

(Jan). Then, on
the sort, I want it to return them grouped together.

Currently I have a custom date format of 'mmm dd' so my

display is 'Jan 13'.
When I just type in 'Jan', it automatically changes it

to 'Jan 01' to match
my format...don't want that.

So, how can I get a format that will display 'Jan 13'

or 'Jan' if it's just
a month (but still let me sort on that column so all the

Jan's are together,
all the Feb's are together, etc.)

Thanks in Advance,
Dave


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Format Help

Formatting after data is stored in a cell does not change the current value
stored in a cell.

--
Regards,
Tom Ogilvy



"FRED" wrote in message
...
As far as I'm aware when you format a date eg 13-jan-2003
to dd-mmm, excel forgets or loses the year and replaces it
with the current system year (though not sure why yours is
2001).

I would say you could have a variable which is the full
date and reference that when sorting.
and possibly use the format or datepart functions to
display the other.

HTH
-----Original Message-----
I have a field where I want the display to be in text,

but when I sort, I
want to sort by date. Here's my dilema, though. I

sometimes need to report
specific dates (Jan 13), but other times, just the month

(Jan). Then, on
the sort, I want it to return them grouped together.

Currently I have a custom date format of 'mmm dd' so my

display is 'Jan 13'.
When I just type in 'Jan', it automatically changes it

to 'Jan 01' to match
my format...don't want that.

So, how can I get a format that will display 'Jan 13'

or 'Jan' if it's just
a month (but still let me sort on that column so all the

Jan's are together,
all the Feb's are together, etc.)

Thanks in Advance,
Dave


.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
How do I convert dd/mm/yy date format to yyddd Julian date format itzy bitzy[_2_] Excel Worksheet Functions 8 December 11th 09 03:20 AM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"