+ Reply to Thread
Results 1 to 10 of 10

Copy and sort timestamp date from noncontiguous rows to a column

  1. #1
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Copy and sort timestamp date from noncontiguous rows to a column

    Over the course of a workshift, I need to count different types of events. I have a spreadsheet that automatically drops timestamp data in the row below where I record the event. I have several noncontiguous rows of timestamp data that get built up over the course of a shift. I would like to populate a column of timestamps as they are recorded on the spreadsheet, so that when I record an event, the timestamp appears in the row below AND appears in a column (on the same sheet) below the last timestamp recorded. I can then run some analysis of the timestamp data from the single column that has been created over the course of my work shift. Clear as mud, no? Thanks in advance for any help offered.

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Hi,

    This one is going to need a sample of some sort.

    S
    ------------------------------------------------------------------------------------------
    If you need no more help on the current problem, please mark it as "Solved". It saves time
    as many of us will look at threads if they are not marked as "Solved".

    The instructions on how to do this are found in the Forum Rules thread that is at top of every forum.
    (Currently you'll have to look at point #9.)
    ------------------------------------------------------------------------------------------

  3. #3
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Happy to oblige. I'm new to the forum...do I upload something?

  4. #4
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    I have attached a file (I think). When I record a value in row 6,8,10,12 (for example), the time stamp appears in the row immediately below. I want to capture those timestamp values in a column to the right of the data collection area as they are recorded. I may record an event in cell F10, then record the next one in cell D35, so I want to be able to capture each time stamp in a column, one after the other, as I progress through the shift.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    A few questions:

    1. How attached are you to circular referencing? I don't think I personally know how to accomplish what you're asking for without using a macro of some sort.
    2. What happens if you update one of the numbers that you've already updated? Should the time update, does it count as two events in your list on the side? (That is, if you should accidentally type in a field you already had a number in?)
    3. Do the fields that have numbers other than 1 have any relevance?
    4. What other information do you need to go with the list on the side? The type of incident? The number you put in the cell?
    That's all I can think of at the moment.

    S

  6. #6
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Thank you for your kind attention. The circular references have more to do with me not really knowing what I'm doing. Once a timestamp is generated, there wouldn't be any further editing to the cell that generated the stamp. The integers have no relevance to the task of columnizing the timestamp data. Ideally, I'd love to color code the timestamps in the new column, to represent which specific group they came from, but getting the timestamp data into a single column in ascending order is the first priority. I agree a macro seems in order, but I am a complete novice when it comes to macros. Thanks again for taking the time.

  7. #7
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Hi,

    Here's are two samples of what you can do. The first sample (Sample.xls) does the same as you have, but adds a macro to record your information in the far column. The second sample (Sample2.xls) removes the circular referencing and puts that part in the macro as well.

    Note: You will need to have Macros enabled (I recommend Medium security so it prompts you when you open the file). You can review the code that is used by hitting ALT+F11 and double-clicking on Sheet10(DEC 5) in the top left small window. You can review the code the first time (disabling macros) and then if you're satisfied with the code, you can enable them the second time you open the file for it to work.

    The changes that were made are as follows:

    1. Added two columns at the beginning in columns B and C. The purpose of this is two-fold. First, it provides a way for the macro to identify that this is the proper row to record the event for. (If there's a value in the row for column C, then it's a valid row.) Second, it provides a simple way to identify what Type and Category belong to the event in the macro. These two columns can be hidden.

    2. Added three columns on the far right to hold the data.

    3. Added a macro that moves the information required to the Summary columns in the spreadsheet.

    4. [Sample2.xls only] Removed the formulas for time and added that to the macro as well.

    I recommend Sample2.xls, but either should work. Any questions about what the code actually does, feel free to ask. The code was set up so that hopefully you only have to make small changes should you need to adjust the spreadsheet layout. If you do make changes to which columns things are in, the macro will need to be adjusted somewhat.

    S
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Forgive me for not replying sooner, but I had to run out of town for a couple of days. I can't thank you enough for your time and effort. I have enabled macros, but nothing happens in the "AG", "AH" and "AI" columns when I enter a value (although the timestamp data does appear in the row below the value -- thank you for fixing my circular reference problem). Is there something I need to do to get those values (Type, Category and Column) to appear in those columns? Once again, thank you for your time. I sense victory here!!

  9. #9
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    Hmm, not sure. You did use the Sample2.xls one?

    What else did you need to do to make it work for you?

    S

  10. #10
    Registered User
    Join Date
    12-05-2010
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy and sort timestamp date from noncontiguous rows to a column

    OK... it works like a charm in Sample.xls (I didn't try that earlier), but the values do not appear in the columns in Sample2.xls

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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