I need formula help

G

Guest

Hello,

I have a column of data that represents a number of hours that looks like
this:

1.5
2.30
1.17

I want to enter a formula in the next column over that will show hours and
minutes so it looks like this:

1.5 | 1:30
2.3 | 2:18
1.17 | 2:10

This formula is part of a macro so I can't have quotation marks in it
otherwise it messes things up there.

If there is any way to get it in this format that would be AMAZING:

1 hr 30 min
2 hr 18 min
etc.

I tried this formula to do that:

=""&(MID(A1,1,1))&" hr "&ROUND((MID(A1,2,3)*60),0)&" min"

But the " marks made it so my macro gave me a syntax error

Thanks!!!!
 
D

David Biddulph

=A1/24 , formatting the result cell as [h]:mm will give
1:30
2:18
1:10 (which I assume you meant, rather than 2:10?)
or formatted as [h]" hr "mm" min" will give
1 hr 30 min
2 hr 18 min
1 hr 10 min
 

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

Similar Threads


Top