Counting Time Blocks and returning words (formula help)

Status
Not open for further replies.

yessir

Board Regular
Joined
Jun 7, 2019
Messages
91
Is there a formula where it can block the time in B1 to where it sees that it's during the 10:00AM block and look at column C and D and see if there is a change in number within that 10:00AM block but only when the location in column A is the same. So for example we see that in location AAA there was no number on 6/1/2015 at 10:10 but there was one at 10:16. But there was one number at 10:10 on 7/1/2015 so this would meaning that they kept 1 in that 10:00 block and would return "Kept 10:00 block". The formula would then continue to go down and see the next time is 13:53 (meaning it's in the 13:00 block) and look to see that there is no previous 13:00 block number so it would return "Kept 13:00 block" And then move further down and see that there currently is a 15:00 block number in 7/1/2015 but no 15:00 number in 6/1/2015 which would then return "Gained 15:00". And would continue to move down the line recognizing when the Location in column A would change.
ABCD
LocationTime
7/1/2015​
6/1/2015​
AAA
10:10​
1​
AAA
10:16​
1​
AAA
13:53​
1​
AAA
15:37​
1​
AAA
16:25​
1​
AAA
17:35​
1​
AAA
21:35​
1​
AAA
21:44​
1​
BBB
14:03​
1​
BBB
14:13​
1​


Ideally it would then look something like this.


AAAKept 10:00
AAAKept 13:00
AAAGained 15:00
AAALost 16:00
AAAGained 17:00
AAAKept 21:00
BBBKept 14:00
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Duplicate Time Blocking and Count? (Formula help)

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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