IF and Date

  • Thread starter Thread starter das
  • Start date Start date
D

das

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.
 
Try
=IF(TEXT(A1,"ddd")="Sun","Sunday","Not a Sunday")
OR
=IF(WEEKDAY(A1)=1,"Sunday","")

If this post helps click Yes
 
say "OFF" if the day is equal to Sunday or Monday

Try this:

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

It was the Weekday function that I was having trouble with. I simply for
got to identify the cell in question.
 
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?
 
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
 
=IF(OR(WEEKDAY(A5)=2,WEEKDAY(A5)=6),"OFF","")

Try it like this:

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