PC Review


Reply
Thread Tools Rate Thread

Days of the week's special format (i.e., Mon = Mn, Tue = Tu ... Sat = Sa, Sun = Sn)?

 
 
StargateFanFromWork
Guest
Posts: n/a
 
      3rd Aug 2007
A long time ago, a kind person in this ng helped me with a substitution code
in another spreadsheet that looks like this:
=IF(A8<>"",A8&"."&CHOOSE(WEEKDAY(DATEVALUE(SUBSTITUTE(A8,".","/"))),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")
The purpose was to get a personal shorthand similar to yyyy.mm.dd.ddd where
ddd would be Mn, Tu, Wd, Th, Fr, Sa, Sn.

This worked for a long time but don't know what has changed as it hasn't
worked for a couple of years or more now.



In a new spreadsheet, I hope to add this personal date format to a cell. In
this one, cell A2's date of 2007.08.06 shows via regular custom date
formatting as Mon.Aug.06.2007 in A2. B1 is the cell that needs the special
custom formatting of 2007.08.06.Mn, etc. The formula in B1 is:

=IF(A2<>"",A2,"")

Just for the sake of seeing if this calculation would also fail, I plugged
in this modified version of the B1 code:
=IF(A2<>"",A2&"."&CHOOSE(WEEKDAY(DATEVALUE(SUBSTITUTE(A8,".","/"))),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")

and, sure enough, it doesn't work in this sheet either.

I get "#VALUE!" in B1.

Wonder what the #VALUE! means here ... Is there a way to fix this?

Cheers and thanks so much! D


 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      3rd Aug 2007
the formula assumes that the cell holds a string value that looks like a
date. Since your cell stores an actual data serial number which can be
formatted, the formula would be:

=IF(A2<>"",TEXT(A2,"yyyy.mm.dd.")&CHOOSE(WEEKDAY(A2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")

--
Regards,
Tom Ogilvy


"StargateFanFromWork" wrote:

> A long time ago, a kind person in this ng helped me with a substitution code
> in another spreadsheet that looks like this:
> =IF(A8<>"",A8&"."&CHOOSE(WEEKDAY(DATEVALUE(SUBSTITUTE(A8,".","/"))),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")
> The purpose was to get a personal shorthand similar to yyyy.mm.dd.ddd where
> ddd would be Mn, Tu, Wd, Th, Fr, Sa, Sn.
>
> This worked for a long time but don't know what has changed as it hasn't
> worked for a couple of years or more now.
>
>
>
> In a new spreadsheet, I hope to add this personal date format to a cell. In
> this one, cell A2's date of 2007.08.06 shows via regular custom date
> formatting as Mon.Aug.06.2007 in A2. B1 is the cell that needs the special
> custom formatting of 2007.08.06.Mn, etc. The formula in B1 is:
>
> =IF(A2<>"",A2,"")
>
> Just for the sake of seeing if this calculation would also fail, I plugged
> in this modified version of the B1 code:
> =IF(A2<>"",A2&"."&CHOOSE(WEEKDAY(DATEVALUE(SUBSTITUTE(A8,".","/"))),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"")
>
> and, sure enough, it doesn't work in this sheet either.
>
> I get "#VALUE!" in B1.
>
> Wonder what the #VALUE! means here ... Is there a way to fix this?
>
> Cheers and thanks so much! D
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting weekly price data into daily (5 days of the week) format Sajjad Qureshi Microsoft Excel Programming 4 9th Feb 2011 10:39 PM
Convert today's date -7 days to week YYYYWW (last week) AFSSkier Microsoft Access Queries 4 26th Nov 2008 09:09 PM
Day of week is not displayed in day, 5 days or 7 days views in Outlook 2003 SP2 (french) Tartempion Microsoft Outlook Discussion 4 22nd Feb 2007 02:38 PM
Days of the Week when printing a calendar in Week to View? =?Utf-8?B?RE9T?= Microsoft Outlook Calendar 0 24th Nov 2006 11:30 AM
how do i show weekend days as a different colour to week days? =?Utf-8?B?amFzb24gaGlnaGFt?= Microsoft Outlook Calendar 0 23rd Feb 2005 10:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 AM.