Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50099

macro to enter time in -mm,ss format

$
0
0
I have a file which is used for calculating Time for the given distance using the given Speed or Time.

I use same cell for inputting speed/ time.

I have conditional formatted it so that if the value is less than 0 i.e negative numbers are considered as time.
and positive numbers are considered as speed.

If the time given is 10 minutes I can able to enter -10.00.
But if the time given is 10 minutes and 35 seconds how can I input this.
I want to input this as -10,35.
I tried inputting this but it resulted in an error.

The distances are entered in cell B2.
Speed / time are entered in E2.
D2 has a formula in which E2 is time then it will convert the time into speed and stores the speed value in D2.

If the value in E2 is -10,35 then it should first convert into minutes and then to speed and store the value in D2.

-10,35 should be converted to 10.5833333 minutes.

Could someone help me with a macro for achieving this.

:confused:

Viewing all articles
Browse latest Browse all 50099

Trending Articles