#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
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


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
Convert date from text format to date format Anita Excel Discussion (Misc queries) 3 June 4th 07 11:57 AM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
Can I change a date with no format (20051111) to date format? Rose New Users to Excel 2 November 11th 05 09:03 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 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


All times are GMT +1. The time now is 09:57 PM.

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

About Us

"It's about Microsoft Excel"