andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
Hello All,
I was using an IF formula to accomplish my goals, however the statement seems to fail me when I run a time that passes midnight. Here is my current formula:
What this does:
It looks at A87& B87 for my criteria. In this case it is a time range: 9:00,10:00 Then it reviews the data in Rows 139:146.
Column E is the start time
Column F is the end time
If 9:00-10:00 falls in between the start and end time, then the count is increased by 1.
In this formula the total wouldn't be higher than 9 as there are only 9 rows being evaluated.
My problem occurs when an ending time is in the AM and excel thinks it is earlier and thus returns a negative value resulting in this formula not counting the row.
I've solved my other totaling issues with a MOD formula, but I am struggling to figure out how to successfully apply that here.
Any assistance would be greatly appreciated.
I was using an IF formula to accomplish my goals, however the statement seems to fail me when I run a time that passes midnight. Here is my current formula:
Code:
{=(SUM(IF(E$139:E$146<$B87,IF(F$139:F$146>$A87,IF(F$139:F$146<$B87,F$139:F$146,$B87)-IF(E$139:E$146>$A87,E$139:E$146,$A87))))*24)}
What this does:
It looks at A87& B87 for my criteria. In this case it is a time range: 9:00,10:00 Then it reviews the data in Rows 139:146.
Column E is the start time
Column F is the end time
If 9:00-10:00 falls in between the start and end time, then the count is increased by 1.
In this formula the total wouldn't be higher than 9 as there are only 9 rows being evaluated.
My problem occurs when an ending time is in the AM and excel thinks it is earlier and thus returns a negative value resulting in this formula not counting the row.
I've solved my other totaling issues with a MOD formula, but I am struggling to figure out how to successfully apply that here.
Any assistance would be greatly appreciated.