First post here.
Let me describe the problem:
A measurement device sends periodic timestamps (integer) values between 0-59 in column A, starting at A2.
The time series can start at any value between 0-59.
The number of transmitted time stamps per second is variable.
I would like to renumber the column values starting in B2, so that
a) the renumbered time series starts with 0
b) the time series will add 60 to whenever its going through its 1st, 2nd.. intervall.
An example might look like this, starting in column A2, going downward:
A B
5 0
5 0
5 0
6 1
6 1
6 1
6 1
7 2
7 2
...
59 54
59 54 <- How to detect and set the proper number?
0 55
0 55
...
I have come up with a partial solution for a) that goes like this
Put a -1 into B1
Use in B2
=IF(COUNTIF(A$1:A2;A2)=1;B1+1;B1)
Use in C2
=IF(COUNTIF(A$2:A2;A2)=1;MAX(B$1:B1)+1;VLOOKUP(A2;A$1:B1;2;0))
I was wondering whether there is a better way to solve part a) of the problem by starting with a general increment series in B that detects whenever the value in column a changes. For b) I havent really found a solution. Any help will be much appreciated.
Thank you kindly.
Bookmarks