Formula Based on Multiple Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
953
Office Version
  1. 365
Hi,

I have the following sheet that tracks system downtime at outlets.Column G to T is the business opening and closing hours. I need to tag as Yes or No in column U if the start or end time for the downtime is within the business hours of the outlets.


Excel Workbook
BCDEFGHIJKLMNOPQRSTU
2*DowntimeMondayMondayTuesdayTuesdayWednesdayWednesdayThursdayThursdayFridayFridaySaturdaySaturdaySundaySunday*
3LocationStart DateStart TimeEnd DateEnd TimeStart TimeEnd TimeStart TimeEnd TimeStart TimeEnd TimeStart TimeEnd TimeStart TimeEnd TimeStart TimeEnd TimeStart TimeEnd TimeAffected
4Tesco Kajang Sales Counter2/14/201110.05 AM2/14/201111.09 PM9.30 AM10.30 PM9.30 AM10.30 PM9.30 AM10.30 PM9.30 AM10.30 PM9.30 AM11.00 PM9.30 AM11.00 PM9.30 AM10.30 PMNo
5Concept-BHN Sek. U3 Shah Alam (Subang Perdana)2/20/20111.06 PM2/21/201112.57 PM9.00 AM7.00 PM9.00 AM7.00 PM9.00 AM7.00 PM9.00 AM7.00 PM9.00 AM7.00 PM9.00 AM7.00 PM9.00 AM7.00 PM#N/A
6Concept-BHN Giant Bukit Tinggi2/20/201110.32 PM2/21/20118.39 AM10.00 AM10.00 PM10.00 AM10.00 PM10.00 AM10.00 PM10.00 AM10.00 PM10.00 AM10.00 PM10.00 AM10.00 PM10.00 AM10.00 PM#N/A
Downtime (2)



Th answer for the all the above should be Yes.

Is there a way to amend the above formula to get it right ?

I have a cross post here:

http://www.excelforum.com/excel-general/765165-formula-based-on-multiple-criteria.html
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You need to format the time in time format eg: 10:05 AM, which Excel stores as a value 0.420138888888889. You then need to create a lookup table with a unique lookup code for opening time and closing time for each location and weekday. Then use a simple VLOOKUP formula to compare for the corresponding weekday if the start of the outage is before the closing time and the end of the outage is after the closing time, then "YES". You may need an additional check where the outage is across weekdays. Hope this points you in the right direction. If not, ask for more details and I'll see if I have the time to post a detailed solution.
 
Upvote 0
Hi baodinh,

My apologies. My skills at formula is very basic.I got the existing formula from the forum. I am not really sure how to create this formula. I hope you could provide some examples on how I can do this.

Appreciate your valuable time and effort.
 
Upvote 0
The question you're asking certainly doesn't match the complexity of those formulas.

If your question is asked correctly then all you need to do is test that the start and end of the down time is >=store open time and <=store close time.

With that being said why should the result for row 6 be Yes?

The start of the down time is 10:32 PM which is past the store close time of 10:00 PM and the end of the down time is 8:39 AM which is before the store open time.
 
Upvote 0
Dear #Name?,

You are correct. My apologies.

The answer for row 6 should be No.

Is there a way to amend the formula to populate the correct answer ?
 
Upvote 0
Dear #Name?,

You are correct. My apologies.

The answer for row 6 should be No.

Is there a way to amend the formula to populate the correct answer ?
Try this...

Entered in U4 and copied down to U6:

=IF(OR(AND(D4>=MIN(G4:T4),D4<=MAX(G4:T4)),AND(F4>=MIN(G4:T4),F4<=MAX(G4:T4))),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,484
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top