Sequence of Up->Down->Up-> repeat until....

ibmy

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

Is this possible to detect this kind of sequence in 250k-750k row data.

1) Count start at least the sequence of up-down
2) Stop the count if next value is not in squence of, increasing(up)-decreasing(down)-increasing(up)-decreasing(down),.... , example:

i- up-down->down
ii- up-down->same value as previous
iii- up-down-up->up
iv- up-down-up->same value as previous

9.13 - 17.xlsb
GH
1
21.18186
31.18187
41.18189
51.18190
61.181891
71.181921
81.181901
91.181921
101.18194
111.181851
121.18184
131.18183
141.17554
151.17555
161.175531
171.175541
181.17554
191.17555
201.175531
211.175541
221.17554
231.17555
241.175541
251.175561
261.17557
271.175531
281.175541
291.175531
301.17552
311.17553
321.17553
Sheet1
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try this
Paste this in H4 and pull down

Excel Formula:
=IF(OR(AND(A3>A2,A3>A4),AND(A3<A2,A3<A4)),1,"")
 
Upvote 0
Thanks @JEC
Some work, some do not work on short sequence but mostly it work on counting long sequence.
My interests on data is long sequence so that all matter.

Anyway, here some do not work base on the example above,
Cell C15 and C31

9.13 - 17.xlsb
ABC
1
21.18186
31.18187
41.18189 
51.1819 
61.1818911
71.1819211
81.181911
91.1819211
101.18194 
111.1818511
121.18184 
131.18183 
141.17554 
151.175551
161.1755311
171.1755411
181.17554 
191.17555 
201.1755311
211.1755411
221.17554 
231.17555 
241.1755411
251.1755611
261.17557 
271.1755311
281.1755411
291.1755311
301.17552 
311.175531
321.17553 
Sheet1
Cell Formulas
RangeFormula
C4:C32C4=IF(OR(AND(A3>A2,A3>A4),AND(A3<A2,A3<A4)),1,"")
 
Upvote 0

Forum statistics

Threads
1,216,227
Messages
6,129,609
Members
449,520
Latest member
TBFrieds

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