1. ## if or (XP)

Please see attached - obviously the formula I wrote in Column is not doing what I want it to do - help, please. The object of the formula is to return a 0 if the employee works more than his/her contracted hours on a Sat or Sun - and multiply the hours worked over contract by 1.5 if they worked on any other day.

Thank you again

Aunt Linda

2. ## Re: if or (XP)

Erm - your attachment didn't make it. Make sure that it's less than 100 KB in size and that you don't preview your post any more after specifying the attachment.

3. ## Re: if or (XP)

Clueless . . . sorry

4. ## Re: if or (XP)

In the first place, the formula in D5 looks at A2 to see if it is Saturday or Sunday. That makes no sense, A2 contains the text "Name". The formula should look at B5 instead.
In the second place, you multiply overtime by 1.5 if it is a Saturday or Sunday, and return 0 for other days - exactly the opposite of what you say you want to do.

Try this formula in D5:

=IF(OR(B5="Saturday",B5="Sunday"),0,C5*1.5)

Fill down as far as needed. Alternatively, you can use

=IF(WEEKDAY(A5,2)>5,0,C5*1.5)

This uses the WEEKDAY function to test if the date in A5 is a Saturday or Sunday (without needing column [img]/forums/images/smilies/cool.gif[/img].

5. ## Re: if or (XP)

Of course the Weekday function is the perfect answer - thank you.

And thank you for pointing out that I was having Excel look at the totally incorrect column - can't wait to retire!

Linda

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•