+ 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
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    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. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  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)

Similar Threads

  1. [SOLVED] dividing a time by a whole number to receive a different time
    By JOSH ALLEN in forum Excel General
    Replies: 10
    Last Post: 04-07-2017, 10:07 AM
  2. Replies: 3
    Last Post: 09-22-2015, 03:04 PM
  3. [SOLVED] Dividing af formula for elapsed time with a fixed(static) time
    By cbend001 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-03-2014, 09:37 PM
  4. [SOLVED] Converting Time into Number and Dividing in Excel
    By newbie4 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-22-2014, 04:43 AM
  5. [SOLVED] dividing a number by a time in excel
    By Adam B Schmitt in forum Excel General
    Replies: 6
    Last Post: 05-03-2012, 08:21 PM
  6. Multiplying with variables
    By Minterm in forum Excel General
    Replies: 2
    Last Post: 03-30-2011, 12:24 PM
  7. Multiplying then dividing the result of the multiplication
    By cbaker1615 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-08-2010, 04:09 PM

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