How to structure the formula properly?

ibmy

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

My objective is to identify (assign "1") the current row (interval) if it overlap from previous rows (intervals).
I have found the formula (thanks to these 3 sites : #1 , #2 , #3) but the problem is when there is a row (interval) that do not overlap (stop assign "1") and start new identify (assign "1")

Book1
CDEFG
1StartEndResultExplanation:
21.217161.21622
31.217061.216411Formula start here, row $2 is locked since this row (interval) is overlap previous row (interval)
41.217331.216611
51.216861.216011
61.217541.216421
71.217771.21702 This row (interval) do not overlap all above intervals. Stop assign "1"
81.214771.21362Start new identify (assign "1") if this row 8 (interval) overlap previous row 7 (interval). The problem is here, I cannot copy paste down formula that lock row $2 since row 7 stop assign "1"
91.214651.214011
101.214441.213671
111.214151.213601
121.214341.213621
131.214471.213401
141.214421.214021
151.214281.213311
161.214551.213321
171.214611.21423
Sheet1
Cell Formulas
RangeFormula
E3:E7E3=IF(MAX(D$2:D3)<=MIN(C$2:C3),1,"")


p/s : The data is minimum 1500 row, maximum 240k rows. Might consider vba code solution if formula solution works slow on 240k rows.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If it's intervals I would expect to see end values that are larger then start values. It never is the case in your sample?
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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