Changing formating

K

Kimti

I have h:mm format in one cell, I would like to change the format to next
cell as number but keep the number same for expample.

a b
0:21 required to have 21

Please help.
 
J

Joe User

Kimti said:
I have h:mm format in one cell, I would like to change the format to next
cell as number but keep the number

It is unclear what you want.


1. If B1 should be total time in minutes, stored as time (fraction of a
day):

B1: =A1

with Custom format "[m]" without quotes.


2. If B1 should be just the minutes, stored as time:

B1: =MOD(TRUNC(A1*1440),60)/1440

with Custom format "[m]" without quotes.


3. If B1 should be total time in minutes, stored as integer:

B1: =TRUNC(A1*1440)

with General format.


4. If B1 should be just the minutes, stored as integer:

B1: =MOD(TRUNC(A1*1440),60)

with General format


5. If B1 should have the string "required to have" followed by total time in
minutes:

B1: ="required to have " & TRUNC(A1*1440)


6. If B1 should have the string "required to have" followed by just the
minutes:

B1: ="required to have " & MOD(TRUNC(A1*1440),60)


----- original message -----
 
O

OssieMac

Assume that 0:21 is in cell A2

Put the following formula in cell B2

=A2*24*60

The explanation is that time is a fraction of one day. Therefore multiply
the fraction by 24 to change it to hours then multiply by 60 to change it to
minutes.
 
O

OssieMac

Forgot to say that you need to set the number format in cell B2 to Number
with no decimal places.
 
D

David Biddulph

.... or to General.
--
David Biddulph

OssieMac said:
Forgot to say that you need to set the number format in cell B2 to Number
with no decimal places.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top