#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF and Date

Hey crew, I'm a little rusty and need some refresher...

In column A I have the dates in =Date(yyyy,mm,dd) format

In column B, I am want the cells to say "OFF" if the day is equal to
Sunday or Monday for instance.

Right now I'm using this formula for Sunday:

=IF(DAY(7)=A4,"OFF","")

Which isn't working. I just can't remember the exact way to do it.

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default IF and Date

Try
=IF(TEXT(A1,"ddd")="Sun","Sunday","Not a Sunday")
OR
=IF(WEEKDAY(A1)=1,"Sunday","")

If this post helps click Yes
---------------
Jacob Skaria


"das" wrote:

Hey crew, I'm a little rusty and need some refresher...

In column A I have the dates in =Date(yyyy,mm,dd) format

In column B, I am want the cells to say "OFF" if the day is equal to
Sunday or Monday for instance.

Right now I'm using this formula for Sunday:

=IF(DAY(7)=A4,"OFF","")

Which isn't working. I just can't remember the exact way to do it.

Thanks for your help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF and Date

Thanks Jacob,

It was the Weekday function that I was having trouble with. I simply for
got to identify the cell in question.


"Jacob Skaria" wrote:

Try
=IF(TEXT(A1,"ddd")="Sun","Sunday","Not a Sunday")
OR
=IF(WEEKDAY(A1)=1,"Sunday","")

If this post helps click Yes
---------------
Jacob Skaria


"das" wrote:

Hey crew, I'm a little rusty and need some refresher...

In column A I have the dates in =Date(yyyy,mm,dd) format

In column B, I am want the cells to say "OFF" if the day is equal to
Sunday or Monday for instance.

Right now I'm using this formula for Sunday:

=IF(DAY(7)=A4,"OFF","")

Which isn't working. I just can't remember the exact way to do it.

Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF and Date

say "OFF" if the day is equal to Sunday or Monday

Try this:

=IF(WEEKDAY(A1)<3,"Off","")

--
Biff
Microsoft Excel MVP


"das" wrote in message
...
Hey crew, I'm a little rusty and need some refresher...

In column A I have the dates in =Date(yyyy,mm,dd) format

In column B, I am want the cells to say "OFF" if the day is equal to
Sunday or Monday for instance.

Right now I'm using this formula for Sunday:

=IF(DAY(7)=A4,"OFF","")

Which isn't working. I just can't remember the exact way to do it.

Thanks for your help.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF and Date

Well, what I've figured out is that Friday and Monday are the days that will
say "OFF"

Im using Jacobs passed on suggestion like this:

=IF(WEEKDAY(A8)=2,"OFF","")

But what I need is it to do the same if the day is 6 as well...

Something like this:

=IF(WEEKDAY(A8)=2)or(Weekday(A8)=6),"OFF","")

But this isn't working

Any ideas Valko?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF and Date


Disregard last message. I messed around and figured it out with this:

=IF(OR(WEEKDAY(A5)=2,WEEKDAY(A5)=6),"OFF","")

Thanks everyone for you help
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF and Date

=IF(OR(WEEKDAY(A5)=2,WEEKDAY(A5)=6),"OFF","")

Try it like this:

=IF(OR(WEEKDAY(A5)={2,6}),"Off","")

--
Biff
Microsoft Excel MVP


"das" wrote in message
...

Disregard last message. I messed around and figured it out with this:

=IF(OR(WEEKDAY(A5)=2,WEEKDAY(A5)=6),"OFF","")

Thanks everyone for you help



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
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Given a date, how do I get the 1st date and the last date of theprevious month? Author[_2_] Excel Worksheet Functions 5 April 2nd 09 12:59 AM
Making a date go red, if date passes todays date. Jamie Excel Worksheet Functions 2 September 9th 08 02:14 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


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