Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Anthony Slater
 
Posts: n/a
Default If/AND/OR help needed..

I'm having trouble with an IF,AND,OR formula...

A4=08:00
B4=20:00

A10 is a time entry cell, such as 10:21
A11 is a date entry cell, such as 20/03/2005
A12 works out the day of the week according to A11 (=A11 formatted as "dddd")


I need the following: -

If the time entered in A10 is between A4 and B4 and the day of week is NOT
Saturday or Sunday the the answer should be "PEAK". If it is Saturday or
sunday, the answer should be "OFFPEAK" regardless of the time.

10:21 on 20/03/05(sun) should be OFFPEAK
10:21 on 21/03/05 (mon) should be PEAK
20:05 on 21/03/05 (mon) should be OFFPEAK

Hope I explained it well

TIA

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(OR(WEEKDAY(A11)=1,WEEKDAY(A11)=7,A10<A4,A10B4 ),"OFFPEAK","PEAK")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony Slater" wrote in message
...
I'm having trouble with an IF,AND,OR formula...

A4=08:00
B4=20:00

A10 is a time entry cell, such as 10:21
A11 is a date entry cell, such as 20/03/2005
A12 works out the day of the week according to A11 (=A11 formatted as

"dddd")


I need the following: -

If the time entered in A10 is between A4 and B4 and the day of week is NOT
Saturday or Sunday the the answer should be "PEAK". If it is Saturday or
sunday, the answer should be "OFFPEAK" regardless of the time.

10:21 on 20/03/05(sun) should be OFFPEAK
10:21 on 21/03/05 (mon) should be PEAK
20:05 on 21/03/05 (mon) should be OFFPEAK

Hope I explained it well

TIA



  #3   Report Post  
Anthony Slater
 
Posts: n/a
Default

Thanks Bob, that worked a treat...

....have a decent day

"Bob Phillips" wrote:

=IF(OR(WEEKDAY(A11)=1,WEEKDAY(A11)=7,A10<A4,A10B4 ),"OFFPEAK","PEAK")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony Slater" wrote in message
...
I'm having trouble with an IF,AND,OR formula...

A4=08:00
B4=20:00

A10 is a time entry cell, such as 10:21
A11 is a date entry cell, such as 20/03/2005
A12 works out the day of the week according to A11 (=A11 formatted as

"dddd")


I need the following: -

If the time entered in A10 is between A4 and B4 and the day of week is NOT
Saturday or Sunday the the answer should be "PEAK". If it is Saturday or
sunday, the answer should be "OFFPEAK" regardless of the time.

10:21 on 20/03/05(sun) should be OFFPEAK
10:21 on 21/03/05 (mon) should be PEAK
20:05 on 21/03/05 (mon) should be OFFPEAK

Hope I explained it well

TIA




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony Slater" wrote in message
...
Thanks Bob, that worked a treat...

...have a decent day

"Bob Phillips" wrote:

=IF(OR(WEEKDAY(A11)=1,WEEKDAY(A11)=7,A10<A4,A10B4 ),"OFFPEAK","PEAK")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony Slater" wrote in

message
...
I'm having trouble with an IF,AND,OR formula...

A4=08:00
B4=20:00

A10 is a time entry cell, such as 10:21
A11 is a date entry cell, such as 20/03/2005
A12 works out the day of the week according to A11 (=A11 formatted as

"dddd")


I need the following: -

If the time entered in A10 is between A4 and B4 and the day of week is

NOT
Saturday or Sunday the the answer should be "PEAK". If it is Saturday

or
sunday, the answer should be "OFFPEAK" regardless of the time.

10:21 on 20/03/05(sun) should be OFFPEAK
10:21 on 21/03/05 (mon) should be PEAK
20:05 on 21/03/05 (mon) should be OFFPEAK

Hope I explained it well

TIA






  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default


"Anthony Slater" wrote in message
...
Thanks Bob, that worked a treat...

...have a decent day


Decent? I'm going to have a great day :-)




  #6   Report Post  
Dana DeLouis
 
Posts: n/a
Default

OR(WEEKDAY(A11)=1,WEEKDAY(A11)=7,

Another option might be:
WEEKDAY(A1,2)<=5

(by shifting Monday to the start of the week)
--
Dana DeLouis
Win XP & Office 2003


"Anthony Slater" wrote in message
...
Thanks Bob, that worked a treat...

...have a decent day

"Bob Phillips" wrote:

=IF(OR(WEEKDAY(A11)=1,WEEKDAY(A11)=7,A10<A4,A10B4 ),"OFFPEAK","PEAK")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony Slater" wrote in
message
...
I'm having trouble with an IF,AND,OR formula...

A4=08:00
B4=20:00

A10 is a time entry cell, such as 10:21
A11 is a date entry cell, such as 20/03/2005
A12 works out the day of the week according to A11 (=A11 formatted as

"dddd")


I need the following: -

If the time entered in A10 is between A4 and B4 and the day of week is
NOT
Saturday or Sunday the the answer should be "PEAK". If it is Saturday
or
sunday, the answer should be "OFFPEAK" regardless of the time.

10:21 on 20/03/05(sun) should be OFFPEAK
10:21 on 21/03/05 (mon) should be PEAK
20:05 on 21/03/05 (mon) should be OFFPEAK

Hope I explained it well

TIA







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
Time format help needed Dan W. Excel Worksheet Functions 19 March 6th 08 09:08 AM
Major help needed mike_vr Excel Discussion (Misc queries) 6 April 19th 05 12:31 PM
Look Up and Cell Reference - Formula Help Needed Janine Excel Worksheet Functions 1 December 14th 04 04:01 PM
If statement help needed please Ian Harris Excel Discussion (Misc queries) 3 December 3rd 04 11:37 AM
Autofit in excel - cell is large than what is needed or wanted & . seezzell Excel Discussion (Misc queries) 2 December 3rd 04 06:39 AM


All times are GMT +1. The time now is 11:15 AM.

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

About Us

"It's about Microsoft Excel"