+ Reply to Thread
Results 1 to 10 of 10

Time Formatting

Hybrid View

candidawalker75 Time Formatting 02-28-2025, 12:05 PM
BadlySpelledBuoy Re: Time Formatting 02-28-2025, 12:32 PM
candidawalker75 Re: Time Formatting 02-28-2025, 12:44 PM
MrShorty Re: Time Formatting 02-28-2025, 12:37 PM
candidawalker75 Re: Time Formatting 02-28-2025, 12:51 PM
BadlySpelledBuoy Re: Time Formatting 02-28-2025, 01:13 PM
candidawalker75 Re: Time Formatting 03-04-2025, 07:19 PM
TMS Re: Time Formatting 03-04-2025, 09:05 PM
candidawalker75 Re: Time Formatting 03-05-2025, 12:31 AM
TMS Re: Time Formatting 03-05-2025, 02:18 AM
  1. #1
    Registered User
    Join Date
    02-27-2025
    Location
    Alabama
    MS-Off Ver
    Office 16
    Posts
    7

    Time Formatting

    I am fairly new to Excel and I'm working on creating an excel sheet that figures the minutes between clock in and clock out times.
    For example, if I clock in at 9:00 AM and clock out at 12:30 PM, I would see hours and minutes 3:30
    I have been able to do this, but I'm looking for a way to make that calculation work with or without having to put a space before the AM & PM. So that time entered as 9:00 AM or 9:00am or 9:00AM would all calculate correctly? I've searched everywhere and I just can not figure this out.

    Once the employee enters their clock in and clock out times, there is a drop down box to show what the clock out was for ie lunch , break, end of day etc... Is there a way to have the number of minutes calculated automatically go into a certain cell depending on which option is chosen from that drop down ? I have columns for lunch, break, training etc.... For example, if I choose lunch from the drop down, then the number of minutes I was at lunch, will auto populate in the lunch column.

    Excel Example.JPG

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,918

    Re: Time Formatting

    You could use data validation to force them to type it in properly. If they type 9:00AM (without the space) they'll get an annoying little message and will soon learn to do it properly.

    I would suggest using "military time" and negate the need to add AM/PM to the end of it, but I know some people don't like that.

    Failing either of those you'll probably have to do some hand holding by over complicating your formulas to account for it.

    Attach a sample workbook and we can try and provide a workable solution to that, and the second part about adding the minutes to a specific column.

    BSB

  3. #3
    Registered User
    Join Date
    02-27-2025
    Location
    Alabama
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Time Formatting

    I definitely like the data validation idea Once that little ping sound pops up enough times, they'll figure it out.
    I love this website. You guys are terrific !

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,385

    Re: Time Formatting

    Are you required to use Excel for this? I tried entering "9:00AM" into a blank LO Calc spreadsheet, and it automatically recognized the time value. I entered the same into Excel and Excel did not recognize the time, but entered it as a text string. The key to being able to perform calculations on these values is to get them entered as numbers and not text.

    Are you required to use a 12 hour clock for these entries? I find that it is a lot easier to enter times in a 24 hour clock, eliminating the need for the AM/PM indicator.

    If you must use Excel and you must use a 12 hour clock, then I would suggest one of two things:

    1) Data validation to force the user to enter the space so Excel can correctly recognize the time entry.
    2) Downstream formulas or macros to correct the user's entry and convert it from text to a number.

    What approach do you like for this?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    02-27-2025
    Location
    Alabama
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Time Formatting

    I'm going with data validation. We are really busy working on the phones in my job. I'm just creating this as a simple, handy tool for my team members to keep track of log in/out phone times. The data validation can be really aggravating constantly popping up, but not so much that they will ditch the tool all together. That data validation will be perfectly annoying but not a deal breaker LOL I am terrible about not entering that space myself, so I will be the first to enter it correctly the first time to stop that ping.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,918

    Re: Time Formatting

    As for the second part of your question. You could accomplish it by using an IF formula to check what's in the 'Code' column then putting the value under the appropriate heading.

    Look at the attached mock up of your file where I've put the below formula in E2 then copied it right and down as required.

    Formula: copy to clipboard
    =IF($D2=E$1,$C2,"")


    BSB
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-27-2025
    Location
    Alabama
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Time Formatting

    Thank you so much for showing me how this can be done. I have taken on the project of teaching myself excel and I don't have to say how this has been such an enormous task. I have made a few changes to my little time tracker and so far, everything has worked out okay, except for the formula to populate the minutes into the correct category automatically like you have shown in your mock file. I have tried everything and spent so many hours on trying to get this to work in my sheet and I have hit a wall. I have attached a copy of the sheet that I'm working on. I'm trying to make it so that when I select a category, then the minutes that I spent from clock in to clock out, will automatically go into the correct place. You show how to do this in the mock file, but I just cannot seem to get that to work. If you have any suggestions on how I might be able to do this or maybe what I'm missing in the excel you sent, I would be forever grateful.
    thank you again so much
    Candy
    Attached Files Attached Files

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,204

    Re: Time Formatting

    This, in F2, copied across and down and formatted as time.

    Formula: copy to clipboard
    =IF($D2=F$1,$C2,"")


    NOTE: the column headings must match the codes in the Data Validation drop down list exactly.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Registered User
    Join Date
    02-27-2025
    Location
    Alabama
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Time Formatting

    I CAN NOT thank you enough for your kindness and help with this! That was PERFECT!!!!!

    Candy
    Last edited by candidawalker75; 03-05-2025 at 12:40 AM.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,204

    Re: Time Formatting

    You're welcome. Thanks for the rep.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] Custom Formatting Time Duration & Editing A Time Calculation
    By Dexter2 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 03-10-2024, 08:38 PM
  2. [SOLVED] Help to modify conditional formatting formulas that display on time and late based on time
    By Longbow 44 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-09-2023, 09:11 AM
  3. [SOLVED] Conditional Formatting - Time (Hours&Min) Greater Than or Less Than Time in Another Cell
    By Alan L 185 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2022, 08:36 PM
  4. Formatting a total time entry and building a cumulative time formula.
    By TMc10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2012, 10:26 PM
  5. Replies: 3
    Last Post: 11-06-2012, 01:37 AM
  6. Replies: 4
    Last Post: 01-11-2012, 07:59 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