Time of Day Question

swiss

New Member
Joined
Feb 16, 2009
Messages
33
Good Day,

I'm attempting to count the number of people who fall in a range of time... My current formula is not working - I've tried two.

On the Sheet 'march hc' row E contains start time 1:00:00 PM as an example while row F contains the stop time so 8:30:00 PM. Row G contains day of week so Monday, Tuesday, etc... I added in a row H for the sumif formula its just a basic counter holding the value of 1.

The row B on the main page where I'm doing the calculations contains time by hour so 1:00:00 PM, 2:00:00 PM, etc..

Formula 1 - not working at all.
=SUM(IF('march hc'!$E$2:$E$1438>=$B8,IF('march hc'!$F$2:$F$1438<$B9,IF('march hc'!$G$2:$G$1438=$C$2,'march hc'!$H$2:$H$1438,0),0)))

confirmed with ctrl+shift+enter

Formula 2 - working but providing results that do not match when verifying the data.
=SUMPRODUCT(--('march hc'!$E$2:$E$1438<=$B10),--('march hc'!$F$2:$F$1438>$B11),--('march hc'!$G$2:$G$1438="Wednesday"))

Any help on this would be great - Thank you so much for any time you spend on this! Have a great day!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Bumping this - it has been a few days just seeing if anyone has any ideas.

Thank you again!
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,853
Members
452,948
Latest member
UsmanAli786

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