Count Same Value Appear In A Range Of Time

ibmy

Board Regular
Joined
Mar 4, 2020
Messages
103
Office Version
  1. 2016
Platform
  1. Windows
Hi,

This thread similiar to "Number of Same Value Appear in a Range of Time" but different rule. Let me know if this violated the rule of this forum because I was thinking reply a new rule request in previous thread but the previous thread already answered and have a solution.

After go through a few sample of data, there were occasion that I will miss a cell that same value in a range of time but in different row. Previous thread, I focus on previous row.

Any result of outcome area welcome as long as objective is met.

research - time group.xlsb
ABCDEFGHI
1timevalueresult
201:11:3290.387
301:11:5890.386
401:12:2890.382
501:12:5590.389
601:13:4190.384
701:13:4390.3891C5
801:13:5190.3871C2
901:13:5790.3872C8 & C2
1001:31:1490.388
1101:31:3290.384
1201:31:4090.385
1301:31:4490.383
1401:32:0990.3841C11. No count C6, not in 10 minutes before 1:32:09 - 1:22:09
1501:32:1590.386
1601:32:1890.3851C12
1701:32:2190.3861C15
1801:32:3190.3852C16 & C12
1901:33:0190.3853C18 ,C16 & C12
2001:33:1790.387No count C9, C8, C2 not in 10 minutes before 1:33:17 - 1:23:17
2102:01:0090.386No count C3, not exist in 10 minutes 2:01:00 - 1:51:00
22
Sheet7

If I use rule of previous thread, I will miss C5 for value 90.389 (C7) , C2 for value 90.387 (C8) , and other cell that not exist in previous row but in range of time.
 
Last edited:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi try this!

=COUNTIFS($C$2:$C$21,C2,$B$2:$B$21,">="&B2-0.00694444444444444,$B$2:$B$21,"<="&B2)-1
 
Upvote 0
I use Column A As Helper column
Book1.xlsm
ABCDEFGHI
1Helper Columntimevalueresult
2C21:11:3290.387 
3C21:11:5890.386 
4C21:12:2890.382 
5C21:12:5590.389 
6C21:13:4190.384 
7C21:13:4390.3891C5
8C21:13:5190.3871C2
9C21:13:5790.3872C8 & C2
10C101:31:1490.388 
11C101:31:3290.384 
12C101:31:4090.385 
13C101:31:4490.383 
14C101:32:0990.3841C11. No count C6, not in 10 minutes before 1:32:09 - 1:22:09
15C101:32:1590.386 
16C101:32:1890.3851C12
17C101:32:2190.3861C15
18C101:32:3190.3852C16 & C12
19C101:33:0190.3853C18 ,C16 & C12
20C101:33:1790.387 No count C9, C8, C2 not in 10 minutes before 1:33:17 - 1:23:17
21C212:01:0090.386 No count C3, not exist in 10 minutes 2:01:00 - 1:51:00
Sheet1
Cell Formulas
RangeFormula
A2:A21A2="C"&IFNA(MATCH(LOOKUP(9.999999999999E+307,IF(B2-$B$2:$B$21>10/1440,$B$2:$B$21)),$B$1:$B$21,0)+1,2)
D2:D21D2=IF(COUNTIFS(INDIRECT(A2):C2,C2)-1=0,"",COUNTIFS(INDIRECT(A2):C2,C2)-1)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
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