+ Reply to Thread
Results 1 to 8 of 8

How to Insert cells with time Increment

  1. #1
    Registered User
    Join Date
    08-21-2019
    Location
    delhi
    MS-Off Ver
    10
    Posts
    4

    How to Insert cells with time Increment

    Hi,
    Will appreciate your expertise on these,

    1) There's a series of data I have . each cell has time in hour/ minute/seconds- -------- second cell has a Value in number

    Now the 1st problem is that not every second has been recorded in this data . 1.e. 12 hrs. 23 minutes 15 second is 1st cell. next cell should be 12 hrs. 23 minutes and 16 seconds.
    However, the second cell is not always showing an increment per second. sometimes it looks per second increment , sometimes it shows two second or five seconds or even eight seconds increment.
    what I would like to do here is that automatically , a new cell should be inserted if the next cell has an increment more than 1 second. i.e. 12.23.16 second should be followed by 12.23.17 seconds and so on.
    same way, if the cell shows an increment of 3 seconds or so on, so the same number of cells should be inserted.

    The Value for each cell should be the same as of the last cell ( in case of new cells inserted).
    That's first problem.

    2) second is that we have a random series of numbers either ascending or descending. What I need to find is a method that the data shows only 20 points reversals, either upside or downside. I.e., starting from first value, if the data is ascending, then it should identify a point where the numbers started descending and descended a minimum of 20 points. there again, it has to identify another point where the number again started ascending and ascended atleast 20 points.

    If this can be done, then half of my problem is solved. will appreciate if you'd guide

    with thanks,
    Last edited by pcindia; 08-22-2019 at 11:57 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: How to Automate Time Increments

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I have attempted to do it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-21-2019
    Location
    delhi
    MS-Off Ver
    10
    Posts
    4

    Re: How to Automate Time Increments

    Thanks Madam, I did the needful. Hope it looks appropriate now

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: How to Insert cells with time Increment

    Being new, you may not realize that you can illustrate your request by uploading a desensitized sample of your data along with what you want done to it (i.e. before and after).
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    The sample only needs to be large enough to illustrate the two parts of the request.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    08-21-2019
    Location
    delhi
    MS-Off Ver
    10
    Posts
    4

    Re: How to Insert cells with time Increment

    attached is the sample sheet. I need date/time column to show increments per second
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: How to Insert cells with time Increment

    The date/time values, at least in column B, are text not numeric. To remedy that use the text-to-columns feature (Next > Next > select Date > YMD > Finish). Custom format yyyy-mm-dd hh:mm:ss
    As to 1st problem modeled for SR1 in columns L:N down through row 100:
    1. Populate column L using: =IF(M2<>"",A$2,"")
    2. Populate column M using: =IF(ROW()=2,B2,IF(OR(M1="",SUM(M1,TIME(0,0,1))>B$27),"",MROUND(SUM(M1,TIME(0,0,1)),TIME(0,0,1))))
    3. Populate column N using: =IF(M2="","",IFERROR(INDEX(C$2:C$27,MATCH(M2,B$2:B$27,0)),N1))
    I am confused as to what is considered a difference of 20 points when looking at the numbers in column C. Perhaps further definition and/or illustration will make it clearer.
    Let us know if you have any questions.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-21-2019
    Location
    delhi
    MS-Off Ver
    10
    Posts
    4

    Re: How to Insert cells with time Increment

    Wow, my friend, you are a genius . Can I rewrite the problem here?

    1) time has not been recorded per second wise. Sometimes, there's a difference of 3-4 or even ten seconds . I need it to automatically keep inserting cells where there's a difference of more than one second , so that I have data for every second.

    2) each cell with time has a corresponding value in next column. the Same value need to be copied if new cells are created,
    3) after 60 seconds, the clock goes back to 00. so this needs to be taken into account that second should not be greater than 60.
    4) data is for a period of two months, so you can imagine the number of cells there. The algorithm you suggest should complete the full spreadsheet
    5) by 20 point difference, I mean the corresponding value after each second. The data is four points after decimal, so a difference of .0020 is the point I need to find. I.e. the data values were descending and descended greater than 20 points, i.e. .0020 . then it came to a point where the values started ascending and ascended greater than .0020 points. this way, Zig Zag is to be found

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: How to Insert cells with time Increment

    Please include some data that illustrates point #5. I believe that I understand what you are describing, however it would be good to see some data and manually include the desired outcomes, so that someone could attempt to write formulas/code that would replicate the outcome.
    Let us know if you have any questions.

+ 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. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  5. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  6. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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