+ Reply to Thread
Results 1 to 4 of 4

Help with Phone time in/out

  1. #1
    Forum Contributor
    Join Date
    05-14-2006
    Posts
    104

    Help with Phone time in/out

    Complex problem for me hopefully not complex for urselves : )

    I get this raw data NB: _ = a new cell
    Clinton_8:59:00_11:30:00
    Clinton_13:33:00_13:33:00
    Clinton_14:03:00_17:04:00
    David_8:30:00_9:33:00
    David_9:56:00_12:25:00
    David_13:26:00_13:58:00
    David_14:01:00_14:34:00
    David_16:10:00_16:32:00
    Felicity_7:00:00_8:54:00
    Felicity_11:05:00_11:48:00
    Felicity_12:20:00_15:00:00
    Frances_9:30:00_11:33:00
    Frances_13:34:00_14:37:00

    and i need for a user e.g Clinton to be able to put in a start and finish time and re organise the data so potentially it look like this :
    Clinton_9:00:00_8:59:00
    Clinton_11:30:00_13:33:00
    Clinton_13:33:00_14:03:00
    Clinton_17:04:00_17:00:00

    to explain why Clinton was off the phone
    Loggin in at 8:59:00 but started at 9:00:00 - no reason needed
    Logged out at 11:30:00 to 13:33:00 - Reason = Meeting
    Logged out at 13:33:00 to 14:03:00 - Reason = lunch
    Logged out at 17:04:00 finished work at 17:00 - Reason 4 min over time ..


    So basically i need a macro to split the ppl up leaving me a chance to put in the start time and finish time (this i know how to do) and reorganise the data so i can put in these times

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    I think you can record a macro for this.
    I pasted your stuff into a workbook, turned on the recorder, used Date >> Text to Columns, and delineated by an underscore.
    Here's the code:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-14-2006
    Posts
    104

    Reply:

    Sorry i might not have explaines this problem correctly - thanks for the reply however

    I only put the _ so that other ppl could erad my data correctly
    it comes through fine from my raw data i have no issues with seperating the data to different cells.

    Ill try re-explain
    if i have
    bill
    bill
    bill
    bill
    jill
    jill
    jill
    Bob
    Bob
    Bob

    i need a macro to search down the list until it finds a different name to the one above and if so insert a line so the data come back like

    bill
    bill
    bill
    bill

    Jill
    Jill
    Jill

    Bob
    Bob
    Bob

    This way i can make a input method (using a userfrom) to input the start and finish times

    i gather it might be something like this
    for say 200 data lines

    sub testshow()
    count = 0

    do while count <200
    count = count + 1

    if activecell = activecell.offset(-1,0) then
    activecell.offset(1,0).select
    else
    """insert line""" - (dont know how)
    end if

    Loop
    end sub

  4. #4
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    It looks to me like you have the beginning of a very good macro. Turn on the macro recorder and insert a row manually. You will see immediately what to put in for the insert row.

    One hint ... when adding or deleting rows, it is very to lose track of which row you are on if you start at the top and work down one row at a time. It is better to start at the bottom and work up one row at a time. That way you do not lose track. So, just offset by -1 instead of offsetting by +1.

+ 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