+ Reply to Thread
Results 1 to 7 of 7

Enter Time as timed, Not Time of Day

  1. #1
    Registered User
    Join Date
    02-16-2007
    Posts
    58

    Enter Time as timed, Not Time of Day

    I need to enter data but it has to be put in as a timed event. Is there a way to make sure the data entered with a ":" is not calculated as a time of day?

    Example
    It took 12:34 (12 min and 34 sec) to do the report. (NOT 12:34 AM)
    I want the data to be entered with mm:ss

    BIG BUT!!! I don't want the user to be able to enter 12:74 (12 min and 74 sec). If they do I want it to calculate the correct time of 13:14 or at least give them an error.

    Thanks,
    Ken

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    if you custom format the cell(s) as [h]:mm, then they will display as you desire.

    Format|Cells >> Custom and enter [h]:mm
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-16-2007
    Posts
    58

    Still not working

    I will explain a little more.

    It displayed in the cell correctly, but it still considers it time in the formula bar 12:34:00 AM. I need it to simply be 12:34 not 12:34:00 AM. The reason is that I have a VLOOKUP looking at this value and putting a result in another cell depending on the data entered. If the cell is seeing the data as Time (AM) then it does not do the VLOOKUP correctly.

    Example

    12:34 C
    08:12 A
    20:56 F

    I hope this explains it a little more. Thanks for the reply
    Ken

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Then you can incorporate a function in your Vlookup to convert the time entered

    e.g

    =Vlookup(TEXT(A1,"[h]:mm")+0,X:Y,2,0)

    or if you entered those "times" in the table as text values...

    =Vlookup(TEXT(A1,"[h]:mm"),X:Y,2,0)

    where X:Y is the table range to lookup the value entered in A1

  5. #5
    Registered User
    Join Date
    02-16-2007
    Posts
    58

    Code

    This is my code

    =IF(Q5="","",VLOOKUP(Q5,INDIRECT(VLOOKUP($F5&$G5,Rubric!$A$194:$B$205,2,FALSE)),2,TRUE))
    PS - There is no space in the word Rubric, it is showing that in this thread for some reason.

    Q5 is where they enter 12:34
    Rubric has a helper table at $A$194:$B$205

    Where would you put this code? I have tried it after the second VLOOKUP and I get a N/A for my result of the VLOOKUP on sheet Rubric.

    Ken
    Last edited by melnikok; 07-11-2007 at 03:57 PM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    just replace Q5

    e.g.
    Please Login or Register  to view this content.
    or, again if your lookup range is text formatted...

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-16-2007
    Posts
    58

    Great!!

    This is working exactly how I would like them to work.

    Thank you so much for your help.

    Ken

+ 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