+ Reply to Thread
Results 1 to 6 of 6

Date Produced based on hours

  1. #1
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    Date Produced based on hours

    I've got essentially three textboxes.

    Texbox one = End Date
    Textbox Two = Hours
    Textbox Three = Start Date


    I want to fill in the End Date, then fill in the amount of hours. Based on the amount of hours picked.

    32 hours picked
    End Date 3/8/2011
    start date = 1/8/2011

    So it displays start date based on amount of hours taken off the end date


    End date textbox is already formatted to only accecpt dd/mm/yyyy format.
    Really appreciate the help.
    Last edited by kieranbop; 11-08-2011 at 07:15 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Date Produced based on hours

    The start date will be: End Date-(Hours/24)

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Date Produced based on hours

    Try this

    Please Login or Register  to view this content.
    Steffen Thomsen

  4. #4
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    Re: Date Produced based on hours

    Thanks I will give that a try

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Date Produced based on hours

    Please Login or Register  to view this content.

    See attached example.

    Dom
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    Re: Date Produced based on hours

    thanks very much both of you,
    I went steffens way so I didn't need to click to calculate as the startdatebox disabled.
    I was getting an error when the value was blank so I put in an error handler and it seems to be working now for me.

    Please Login or Register  to view this content.

+ 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