Multi-Criteria Crisis

Odikira

New Member
Joined
Oct 16, 2017
Messages
1
Hello Mr. Excel members. I am turning to you for help and I hope I don't confuse you.

SO, here is the situation. We have data that is appended to a spreadsheet daily and now we need to have a very simple count done, but it turns out to not be so simple. Here is a sample of the data:

CompletedDateReleaseTypeCodeTowerTypeCompletedTimeReleaseTimeReleaseDateCount
4/10/2016ROPSGT51/2/0021:324/28/2017=SUMPRODUCT(--(WEEKDAY(G2:G11,2)>5))
4/10/2016ROPSGT51/2/0021:324/28/2017
4/11/2016ROPSGT51/2/0021:324/28/2017
4/11/2016ROPSGT51/2/0004:454/29/2017
6/3/2016ROPA&B51/2/0010:004/27/2017
6/4/2016ROPA&B51/2/0010:004/27/2017
6/3/2016ROPSGT51/2/0004:454/29/2017
6/3/2016ROPCENT51/2/0015:554/6/2017
6/6/2016ROPCENT51/2/0015:554/6/2017
8/30/2016ROPSGT51/2/0007:234/29/2017

<tbody>
</tbody>

What I am trying to do is count how many records have a release date that is on the weekend and how many are after or outside business hours (08:00-18:00). So far I am able to get a count with a static range (G2-G11), but the problem is our data is added to each day. We would like to have it be a little more dynamic. The other thing is I have been unsuccessful in counting a cell if it's outside business hours, and not have it double if it's outside the business hours and on the weekend. Any help you can provide would be greatly appreciated. So the three things I need help with,

1 - Count how many rows have a release date that is on a weekend.
2 - Count how many rows have a release time outside business hours (08:00-18:00).
3 - Dynamic range to include new data added daily (this isn't a priority, but would be helpful).

Thank you for all your help!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
For a dynamic range you can use a named range with OFFSET.
When you format your table with FORMAT AS TABLE then Excel use automatic dynamic ranges!!!!

Example with OFFSET:

ReleaseTime : =OFFSET(Sheet1!$F$2,0,0,COUNTA(Sheet1!$F:$F)-1,1)
ReleaseDate : =OFFSET(Sheet1!$G$2,0,0,COUNTA(Sheet1!$G:$G)-1,1)

Count outside worktime and outside weekend:
=SUMPRODUCT(--(((ReleaseTime<8/24)+(ReleaseTime>18/24))*(WEEKDAY(ReleaseDate,2)<6)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,299
Members
449,499
Latest member
HockeyBoi

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