+ Reply to Thread
Results 1 to 4 of 4

Spin Button for 24hrs time entry

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Spin Button for 24hrs time entry

    Hello guys

    im looking for somw help with a formula to allow me to insert a spin buttom to change the time by 30 minute increments. I have made a simple formula to complete this task but i've come up with a small problem.
    When I reach 24:00 my the time changes to 00:30 then 01:00 as it should but this will only happen until the maximum number is reached in the spin box properties.

    Is there a formula that can be used to allow the user to keep clicking on the increase or decrease button and the time value will cycle through the 24hrs of the day in the 30 minute increments I want.

    The project im working on is an ETA calculator for the ship im working on right now. iI want to use the spin buttons to make data entry as easy as possible for the end user, rather than typing in numerical values. The only numerical value I want them to type is the distance between ports.

    I'm new to excel and I have seen some VBA code online, but I'd rather stay away from this as I haven't got the foggiest about VBA Code. To sum it up what I'm looking for is a formula that will loop through the 24hrs of the day in 30min increments if the user was to keep pressing the increase button and vise versa.

    Thanks for you time and ive attached the formula that I've been working on so far.

    Cheers

    Martin
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Spin Button for 24hrs time entry

    Try the following formula:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Spin Button for 24hrs time entry

    the spin button do not have "wrap around" property. You can cheet a bit changing the formula into
    Please Login or Register  to view this content.
    now the upper limit for spinbutton can be very high (for instance 30 000 and you can have starting point of say 15 000). But after same (rather long ;-) time you can "touch the wall" at 0 or 30000.

    edit: Ooops, while writing this the identical formula has been proposed - but have a look o max and starting value comment.

  4. #4
    Registered User
    Join Date
    01-06-2014
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Spin Button for 24hrs time entry

    Guys

    Thanks for the help! I've added the above formula and adjusted the min and max values to a mid point and its working a treat!

    Thanks for your help!

    Martin

+ 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] Time add of 24hrs+
    By pr4t3ek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2013, 06:43 AM
  2. How to use spin button to store time in two textboxes
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2009, 08:08 AM
  3. Replies: 2
    Last Post: 03-12-2008, 06:52 PM
  4. Spin Button:spin cells A7
    By ice in forum Excel General
    Replies: 1
    Last Post: 03-16-2007, 02:23 PM
  5. how to add time above 24hrs...
    By Bill R. in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-09-2005, 02:00 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