Assign "1" to numbers in order

ibmy

Board Regular
Joined
Mar 4, 2020
Messages
103
Office Version
  1. 2016
Platform
  1. Windows
Hi, need expert help.
Noob like me only managed to get the idea : =IF(A1+1=A3-1, "1", "0") but doest work ?

Column A --- Column B

7 ---
1 --- (no count since only number 1)
5 ---
1 ---
3 --- (no count since no number 2 for order)
1 ---
2 ---
3 --- 1
1 ---
2 --- 1
0 ---
8---
1 ---
2 ---
4 --- (no count since no number 3 for order)
1 ---
2 ---
3 ---
4 ---
5 ---
6 ---
7 --- 1

- Order starting from number 1
- Count restart when number is not in order and find next number 1 with order ( at least number 2)
- At least number 2 is counted, if there is only number 1- no count
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
@jasonb75 @gaz_chops @Snakehips It work at some row and do not work at some row

File : Data 8-5-2020

Can I ask for a little bit change how do I want the outcome of result. Sorry for change of topic thread.

- Count the number in order increasingly at least 2 number -


Column A --- Column B


6
7
--- 1 order
7
8
9
--- 2 order
5
4
5
6
--- 2 order
4
5
6
7
--- 2 order
10
13
12
13
--- 1 order
13
14
--- 1 order
16
17
18
--- 2 order
18 ---
18 ---
16 ---

- Order can start from any number AND order must at least 2 number increasingly.
- Count reset if there is number lower than the current value OR there duplicate/repetitie number.

The tricky part is when the sequence are :-


1) Order are skip 1 number then reset to new order .

Example 1:

1 --
2 --- 1 order
4 ---
5 --- 1 order
7 ---
8 --- 1 order

Example 2:

1 ---
2 ---
3 --- 2 order
5 ---
6 ---
7 --- 2 order

2) Duplicate/repetitive are not count as long as no order found.

Example 1:

1 ---
2 ---
3 --- 2 order
3 ---
3 ---
3 ---
4 ---
5 ---
6 --- 3 order

Example 2:

1 --
2 ---
3 --- 2 order
3
---
4 ---
5 ---
6 --- 3 order
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

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