A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Format



 
 
Thread Tools Display Modes
  #1  
Old September 1st, 2008, 06:21 AM posted to microsoft.public.excel.worksheet.functions
TFMR
external usenet poster
 
Posts: 20
Default Date Format

Dear All,

I have time sheet, which have Date and day columns in day column I gave the
ref. to A1 and change the format to "DDD", It shows the day e.g. Mon or Tue.
Now I want to apply formula that if b1="Sat" or "Sun" then return Off in c1
otherwise Morning in C1, but I am getting Morning in all cells.
Kindly advise what I have to mention in formula instead of Sat.
formula in C1 is "=if(b1="Sat"."Off",if(b1="Sun","Off","Morning "))
I tried full day but same result.

Thanks
  #2  
Old September 1st, 2008, 06:31 AM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default Date Format

One way is to convert the underlying date value in B1 to "day" using TEXT
(Formulas read/evaluate underlying values, not displayed/formatted values)

In C1:
=IF(TEXT(B1,"ddd")="Sat","Off",IF(TEXT(B1,"ddd")=" Sun","Off","Morning"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,700 Files:359 Subscribers:55
xdemechanik
---
"TFMR" wrote:
I have time sheet, which have Date and day columns in day column I gave the
ref. to A1 and change the format to "DDD", It shows the day e.g. Mon or Tue.
Now I want to apply formula that if b1="Sat" or "Sun" then return Off in c1
otherwise Morning in C1, but I am getting Morning in all cells.
Kindly advise what I have to mention in formula instead of Sat.
formula in C1 is "=if(b1="Sat"."Off",if(b1="Sun","Off","Morning "))
I tried full day but same result.

Thanks

  #3  
Old September 1st, 2008, 10:33 AM posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_]
external usenet poster
 
Posts: 2,297
Default Date Format

Hi

You could use
=IF(WEEKDAY(B1,2)5,"Off","Morning")

--
Regards
Roger Govier

"TFMR" wrote in message
...
Dear All,

I have time sheet, which have Date and day columns in day column I gave
the
ref. to A1 and change the format to "DDD", It shows the day e.g. Mon or
Tue.
Now I want to apply formula that if b1="Sat" or "Sun" then return Off in
c1
otherwise Morning in C1, but I am getting Morning in all cells.
Kindly advise what I have to mention in formula instead of Sat.
formula in C1 is "=if(b1="Sat"."Off",if(b1="Sun","Off","Morning "))
I tried full day but same result.

Thanks


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:39 PM.


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