At 13:50 24/03/2009 +0200, Hylton Conacher wrote:
Seriously though convert a time value to a valid decimal value and vice versa.
As I mentioned, time values entered the way Calc expects *are*
decimal values (possibly fractions) - but in days. (And what I now
see you actually want to do appears to be to convert to an *invalid*
decimal value.)
Thanks for the assistance but there is something wrong.
Values I get from an old sharp EL-532 Scientific calculator, which I
trust absolutely ...
No-one else can trust these unless you tell us what they are and what
they are meant to represent!
... are different to the ones you give, and yet I cannot see how.
My values are entered so:
Distance(km) Time(0.mmss)
3.2 0.3407
Aaargh! What do you mean by "0.mmss"? Do you mean your figure to
represent 34 minutes and 7 seconds? If so, this is not the fraction
0.3407 of anything, of course! It's not even 3407 of anything.
The calculated values are:
Speedkm/hr) Min/km
5.63 0.1039 ie 10m 39s
Oh, dear: you really *do* mean that you want values expressed in a
mixture of different units to be represented by a decimal fraction
that bears little discernible relation to the actual values.
How can these values be achieved with Calc formulae?
Some observations:
o No-one could have remotely guessed the detail of what you were
asking from your earlier request.
o If you really want to do this, you are going to have to spend some
time creating complicated formulae to *mis*use the values in cells,
interpreting them not as the numbers they are but in the odd way your
calculator does. (Such formulae will have been built in to your
calculator.) There are probably two ways of doing this: storing the
values as either the decimal fractions which they appear to be or
else as text strings with the same appearance. In either case, your
calculation formulae will effectively have to strip the values into
their components, calculate with those, and then reassemble the
result to appear as you want it.
o The reason your calculator does it the way it does is not because
this is in any way desirable, but simply because of the limitations
of its display: I'm guessing that it can display values such as
0.1039 but not "10min 39s" or "10:39" or even "10 39". To borrow
(and modify) a common mantra: this is not a feature of your
calculator; it is a bug! Calc can easily display values in any of
these formats, of course. What you are proposing to do is to make
your much more flexible computer system behave as if it were limited
in the same way as your calculator display. That might be an
interesting academic exercise, but I'd counsel against it if you
simply want to be able to derive and display actual values. Use the
spreadsheet as a spreadsheet and rejoice in what it can do better
than your calculator.
o You say that the answers you are getting are different, but you
have changed your problem somewhat! If you enter 34 minutes and 7
seconds as 0:34:7 and then use the formula =3.2/(xx*24), you will see
5.63, as you hope. To calculate minutes per kilometre, use =xx/3.2
. This will show as 0.00740 - which is in days per
kilometre. Format the result cell as MM:SS and you will see
10:40. (The actual value has 39.6875 seconds: you calculator does
not appear to know how to round properly.)
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]