Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Days of the week's special format (i.e., Mon = Mn, Tue = Tu ... Sat = Sa, Sun = Sn)?

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(SUBSTIT UTE(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(SUBSTIT UTE(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! :oD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Days of the week's special format (i.e., Mon = Mn, Tue = Tu ... Sa

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(A 2),"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(SUBSTIT UTE(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(SUBSTIT UTE(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! :oD



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
Days in Text to Dates SPECIAL DOUG Excel Worksheet Functions 1 April 13th 10 10:09 PM
SPECIAL NUMBER FORMAT Faraz A. Qureshi Excel Discussion (Misc queries) 2 January 28th 10 01:41 PM
Excel 2003. Custom format gets replaced by Special format. jasper New Users to Excel 0 September 1st 08 03:46 AM
Given today's date, I want this week's Monday's date BlueWolvering Excel Worksheet Functions 3 February 12th 08 06:16 PM
How do I keep each week's data from the payroll calcualtor? Betsy Excel Worksheet Functions 1 April 12th 05 03:54 PM


All times are GMT +1. The time now is 11:04 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"