+ Reply to Thread
Results 1 to 3 of 3

Excel/VBA/Dividing and Multiplying Time Variables

  1. #1
    Registered User
    Join Date
    02-09-2018
    Location
    Scottsdale
    MS-Off Ver
    Office 365
    Posts
    4

    Question Excel/VBA/Dividing and Multiplying Time Variables

    I need to be able to enter a Time using hh:mm:ss format and then dividing the number by an integer. Then I need to multiply the result by another integer and express the result in hh:mm:ss format. I have tried using Date/Time variables but the division is dividing all of the days included in the entry. Any help appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    714

    Re: Excel/VBA/Dividing and Multiplying Time Variables

    the days value is an integer value and should be handled separeately then concatenated to the reusult of the time, which may also need to be handled separately and concatenated to put it all back together, unless you do it by the double integer value of date and time which is a decimal value.

    For example with the time, say your value is in cell B2
    Please Login or Register  to view this content.
    Should give you a result in "00:00:00" format.
    Last edited by JLGWhiz; 02-28-2018 at 09:36 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel.

  3. #3
    Registered User
    Join Date
    02-09-2018
    Location
    Scottsdale
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Excel/VBA/Dividing and Multiplying Time Variables

    Thanks. I was hoping for a less used function but i can handle what you suggested. Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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