[mso] Re: Conditional Date FORMAT, Possible?

Robert,

(1) No, conditional formatting will not extend to date formats
(2) Excel will perform mathematical operations with your dates however
they are formatted. Even if the current date is formatted as "yyyy" so
that it appearts on screen as "2004" only, Excel will still treat it in
operations as 29 July 2004.
(3) My advice would be to insert an extra column. Hide the date column
if you want, but base all calculations on it. In the new column, have a
nested if which uses the TEXT function to provide you with the output
you want, e.g.

        =TEXT(TODAY(),"yyyy") gives 2004
        =TEXT(TODAY(),"dd-MMM-yyyy") gives 29-Jul-2004

These will be held as strings, not dates, so it's important either to
use your original date cell in formuale, or to wrap a DATEVALUE formula
around this new string.

Ray
------------------------------------
GR Business Process Solutions
Ray Blake
Head of Software Design
ray@xxxxxxxxx
Braedon
Newell Road
Hemel Hempstead
Herts HP3 9PD
tel: 01442 396518
fax: 01442 389353
www.grbps.com
------------------------------------


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of Robert Carneal
Sent: 29 July 2004 06:07
To: mso@xxxxxxxxxxxxx
Subject: [mso] Conditional Date FORMAT, Possible?


Can the date format be conditional upon the value in a cell?

Suppose
A1=1817
B1=11
C1=5
D1=10
E1 will have a date based on A1, B1, C1. I will add 2000 to the year to
keep Excel happy, so the date appears as 3817-Nov-05 out of sight of the
user. A2=1935 B2=7 C2=0 D2=8 E2 should end up with 3935-Jul.

In E1 assemble a full date in format YYYY-MMM-DD, but
In E2 the date format is YYYY-MMM only.

In English, can I do this in column E?
If D1 = 10 then
DATE(A1,B1,C1) [in YYYY-MMM-DD format]
Else if D1 = 8 then
Date(A1,B21) [in YYYY-MMM format]
ELSE IF D1 = 6 THEN
DATE(A1) [YYYY format]
End if

It is missing a couple End Ifs, but it illustrates what I am trying to
do. Possible? My attempts don't work.

I can do conditional formatting for colors, what about conditional
formatting of formats? Possible?

Now I have a different question. If I have two differently properly
formatted dates, can math be performed on them? Say F1 contains
1922-Jan-28 and G1 contains 1993-Jun. Excel recognizes those dates.
Should it be be able to perform math on those, or do they need to be the
same format?

Thank you.

Robert


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx
or MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the
quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will
also allow you to change your email settings to digest or vacation (no
mail). http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group,
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an
invitation with instructions.  Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: