+ Reply to Thread
Results 1 to 5 of 5

Turning semiperiodic column values into continuously increasing column values

  1. #1
    Registered User
    Join Date
    12-05-2019
    Location
    Singen, Germany
    MS-Off Ver
    2010
    Posts
    3

    Turning semiperiodic column values into continuously increasing column values

    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.
    Attached Files Attached Files
    Last edited by meriadoc; 12-07-2019 at 03:02 AM. Reason: Example File uploaded

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Turning semiperiodic column values into continuously increasing column values

    Welcome to forum,

    Please provide the expected result

  3. #3
    Registered User
    Join Date
    12-05-2019
    Location
    Singen, Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Turning semiperiodic column values into continuously increasing column values

    The incoming time series is shown in column A and the expected result is shown in column B in the text above. In the example.xls file the original time series is in Column A and the partial solution is in Column C.

    The computed time series must be renumbered such that the first value starts with 0, as shown in B, and it must be continuous such that the timer doesnt switch back from second 59 to 0, but instead continues with 60 onward.

    I believe the most effective way is to detect a number change in column A and then perform an increment of B starting with 0. However, I haven't found a solution to this.

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Turning semiperiodic column values into continuously increasing column values

    May be try

    =IF(A2<>A1,B1+1,B1)
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  5. #5
    Registered User
    Join Date
    12-05-2019
    Location
    Singen, Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Turning semiperiodic column values into continuously increasing column values

    Thanks for the hint.

    I used column B to compute the expression =IF(ISBLANK(A3),"",IF(A2=A3,B1,B1+1)) so that I get the incremental series ignoring blank cells.
    I followed up in column C with =IF(ISBLANK(B1),"",B1)

    Solution is attached. If anyone has a way to directly shift the data in column B one line down. let me know.

    I consider this as solved - thanks again.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Increasing column Values
    By kprabhupaul in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-31-2019, 01:41 PM
  2. Replies: 8
    Last Post: 11-15-2016, 03:47 AM
  3. Transpose values in column to rows, and split cell values to extend column
    By SAMMM in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-03-2015, 12:52 AM
  4. Replies: 1
    Last Post: 06-02-2014, 03:36 PM
  5. [SOLVED] Finding the closest value throughout the column of decreasing/increasing values
    By Arty_1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2014, 07:37 PM
  6. Replies: 2
    Last Post: 12-30-2013, 08:15 AM
  7. [SOLVED] Increasing values in Price column
    By Gold N Silver in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2006, 12:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1