• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

Multiply static time by variable number in minute / seconds

Hello Experts,

I always get confused on getting the correct time it requires to perform a task based on a set number and keep in minute/second format.
I need the outcome to be in the minute:second format 0:00:00
A1 is the time to perform the task (in this case 0:01:04)
A2 is the variable number to enter for the count of tasks to be completed (scenerio is 24)
(A2 will be keyed by end-user and is a variable number)
In my example 24 x 0:01:04 = 0:25:36

I am not sure if this is an excel expression or a vba change cell calcuation to derive this result.

Any assistance would be appreciated since I am stuck and need to use this format for numerous task activities.

Thanks,
Michael
0
mike637
Asked:
mike637
  • 2
1 Solution
 
kgerbChief EngineerCommented:
Hello Michael,
There may be an easier way but this seems to work.  In my formula A1 contains the hh:mm:ss.  B1 contains the multiplier.  Here's the formula.

=TEXT(B1*SUM(HOUR(A1)*60^2,MINUTE(A1)*60,SECOND(A1))/86400,CHOOSE(MATCH(B1*SUM(HOUR(A1)*60^2,MINUTE(A1)*60,SECOND(A1)),{0,60,3600},1),":ss","m:ss","[h]:mm:ss"))

Kyle
0
 
kgerbChief EngineerCommented:
If you want the format to be consistent then you can this.  It's shorter.

=TEXT(B1*SUM(HOUR(A1)*60^2,MINUTE(A1)*60,SECOND(A1))/86400,"hh:mm:ss")
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now