View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Display a number as Kilometers and k/hr & as Time

On Mon, 21 Nov 2005 04:35:49 -0600, Gonzo
wrote:


Hi Guys,
Can someone help me display a number from a formular as kimometers
and kilimoters per hour, like "21k/hr" and also display 2 digit numbers
at time, as in 34 would show as 0:34 or even better would be as " 34
mins" in the cell and 3 to 4 digit numbers as time like "3:45" or "3h
45m" would be great.

Thanks guys, other than that, if you have any ideas to help me please
look at http://users.bigpond.net.au/adams_st...ng%20stats.xls and
let me know if i can get rid of decimal time in the data sheet..


Thanks again.


Assuming you've computed your km and km/hr as decimal numbers:

1. Select the Cell
2. Format/Cells/Number/Custom Type:
0 "k"
or
0 "k/hr"

For the time function, because of the way Excel stores times, you need to first
divide your "decimal time" by 24. This may require that you also alter your
km/hr formula to multiply by 24.

Then

Format/Cells/Number/Custom Type:
[h]"h "mm"m"


--ron