Excel 2003
I'm having a problem working out a formula for Column P on a monthly timesheet. All my other formulas seem to be OK.
I enter the date for the first day of the month (e.g., 6/1/07) in C60 which formats as June 2007.
Column B contains weekdays (text): Sat, Sun, Mon, Tue, Wed, Thu, Fri, respectively.
Therefore, for June, 2007, it should look something like:
A4 thru A10 formulas, respectively, are:
=IF(WEEKDAY($C$60)=7,$C$60,"")
=IF(WEEKDAY($C$60)<1,A4+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=1,$C$60,"")))
=IF(WEEKDAY($C$60)<2,A5+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=2,$C$60,"")))
=IF(WEEKDAY($C$60)<3,A6+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=3,$C$60,"")))
=IF(WEEKDAY($C$60)<4,A7+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=4,$C$60,"")))
=IF(WEEKDAY($C$60)<5,A8+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=5,$C$60,"")))
=IF(WEEKDAY($C$60)<6,A9+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=6,$C$60,"")))
A14 thru A20 formulas, respectively, are:
=A10+1
=+A14+1
=+A15+1
=+A16+1
=+A17+1
=+A18+1
=+A19+1
Now, here's the part with which I'm struggling. Column P needs to be:
(IF A4 >= $C$60) AND (IF B4 <> "Sat" OR "Sun"), ENTER A VALUE OF 8, OTHERWISE LEAVE BLANK
In other words, IF A4 contains a DATE AND IF B4 is not equal to "Sat" OR "Sun", THEN enter a value of 8; otherwise, leave it blank.
Currently, I have the formula
=IF(AND(A6>=$C$60,B6<>"Sat",B6<>"Sun"),8,"")
and my timesheet looks like:
TIA for any and all resposnes
I'm having a problem working out a formula for Column P on a monthly timesheet. All my other formulas seem to be OK.
I enter the date for the first day of the month (e.g., 6/1/07) in C60 which formats as June 2007.
Column B contains weekdays (text): Sat, Sun, Mon, Tue, Wed, Thu, Fri, respectively.
Therefore, for June, 2007, it should look something like:
Code:
A B ... P
3 Date Day ... Hrs Paid
4 Sat
5 Sun
6 Mon
7 Tue
8 Wed
9 Thu
10 06/01/07 Fri 8.00
11 WEEKLY TOTAL
12 Date Day ... Hrs Paid
13 06/02/07 Sat 8.00
14 06/03/07 Sun 8.00
15 06/04/07 Mon 8.00
16 06/05/07 Tue 8.00
17 06/06/07 Wed 8.00
18 06/07/07 Thu 8.00
19 06/08/07 Fri 8.00
20 WEEKLY TOTAL
etc.
=IF(WEEKDAY($C$60)=7,$C$60,"")
=IF(WEEKDAY($C$60)<1,A4+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=1,$C$60,"")))
=IF(WEEKDAY($C$60)<2,A5+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=2,$C$60,"")))
=IF(WEEKDAY($C$60)<3,A6+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=3,$C$60,"")))
=IF(WEEKDAY($C$60)<4,A7+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=4,$C$60,"")))
=IF(WEEKDAY($C$60)<5,A8+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=5,$C$60,"")))
=IF(WEEKDAY($C$60)<6,A9+1,IF(WEEKDAY($C$60)=7,"",IF(WEEKDAY($C$60)=6,$C$60,"")))
A14 thru A20 formulas, respectively, are:
=A10+1
=+A14+1
=+A15+1
=+A16+1
=+A17+1
=+A18+1
=+A19+1
Now, here's the part with which I'm struggling. Column P needs to be:
(IF A4 >= $C$60) AND (IF B4 <> "Sat" OR "Sun"), ENTER A VALUE OF 8, OTHERWISE LEAVE BLANK
In other words, IF A4 contains a DATE AND IF B4 is not equal to "Sat" OR "Sun", THEN enter a value of 8; otherwise, leave it blank.
Currently, I have the formula
=IF(AND(A6>=$C$60,B6<>"Sat",B6<>"Sun"),8,"")
and my timesheet looks like:
Code:
A B ... P
3 Date Day ... Hrs Paid
4 Sat
5 Sun
6 Mon 8.00 [red]should be blank[/red]
7 Tue 8.00 [red]should be blank[/red]
8 Wed 8.00 [red]should be blank[/red]
9 Thu 8.00 [red]should be blank[/red]
10 06/01/07 Fri 8.00
11 WEEKLY TOTAL
12 Date Day ... Hrs Paid
13 06/02/07 Sat 8.00
14 06/03/07 Sun 8.00
15 06/04/07 Mon 8.00
16 06/05/07 Tue 8.00
17 06/06/07 Wed 8.00
18 06/07/07 Thu 8.00
19 06/08/07 Fri 8.00
20 WEEKLY TOTAL
etc.