+ Reply to Thread
Results 1 to 6 of 6

Calculations times in UserForm

  1. #1
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Calculations times in UserForm

    Hi,
    I'm trying to make automatically some calculations but all my work was in vain because I'm not sure how should it be done!
    What the user should do is
    first example from userform:
    in the 1st table (time)
    the user has a look in column B and see the departure time 18:15 between 17:00-04:59, choose how many sectors are needed and here are 2 -> and the time std=11:00 hours.
    or time max (11:30)is find in the 2nd table.

    the second example from userform:
    the user has a look in column B and see the departure time 15:00, then adds 12:00 hours (time std)= 03:00 local time, subtracts 15 min, subtracts the trip time (03:00 hours) =23:15 a specific time
    in other words, he has to depart at 23:15 in order not to exceed that 12:00 hours(time std).

    For your reference I attached a test file and a pic.
    I really appreciate your help!

    after.jpg
    Attached Files Attached Files
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Calculations times in UserForm

    How is the user selecting what is to appear in the userform?

    What calculations do you actually want to do?

    If you are working with times stored as text, ie values in textboxes, you might want to be looking at using TimeValue to get 'real' time values to use in your calculations.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Calculations times in UserForm

    Hi Norie and thank you!

    for the 1st example in my userform, the user types the departure time (whatever he needs), types the sector/s and the result should be the time, the intersection of "those lines"

    the 2nd one
    here are some calculations...
    the user types the departure time, he has the time already calculated -the above example- (std time or duty time) and is written in that textbox, teh result is time, local time (i.e 09:00 + 08:00 (duty time)=17:00..... then 17:00-15min=16:45 - 00:55 (the way to home)=15:50 the time when our guy has to depart.

    hope this is make sense...

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Calculations times in UserForm

    Hi all,
    I solved it but not into userform, I have no ideea how to di it, just in a regular sheet...perhaps someone can help me.
    Thank you!

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Calculations times in UserForm

    Do you mean you still want to use a userform?

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Calculations times in UserForm

    well, I protected some cells, and the sheet also, in order not to delete the formulas by mistake...colored a little bit and it looks pretty nice! my colleagues are very happy!
    Thank you, I think I'll stay with the simple sheet!

+ 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. Duration Calculations between dates and times
    By rhoover7420 in forum Excel General
    Replies: 1
    Last Post: 08-19-2016, 04:15 PM
  2. [SOLVED] Convert Text Times for calculations
    By bigroo1958 in forum Excel General
    Replies: 8
    Last Post: 06-25-2015, 01:15 PM
  3. [SOLVED] Conditional times calculations
    By Khaldon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2015, 05:49 AM
  4. Overtime calculations / times
    By frazzled in forum Excel General
    Replies: 6
    Last Post: 03-01-2011, 06:35 AM
  5. Calculations with Dates/Times
    By soma104 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2010, 02:05 PM
  6. Calculations Involving Durations in hh:mm, NOT Times
    By h.statsmaster in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2009, 01:43 AM
  7. [SOLVED] Difference in dates calculations except between certain times.
    By Steve Hud in forum Excel General
    Replies: 1
    Last Post: 01-13-2006, 09:15 AM

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