Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default I need formula help

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!!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default I need formula help

=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
--
David Biddulph

"Still Learning" wrote in message
...
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!!!!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"