[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-users] Help with formula - number conversion


On Fri, 2019-07-12 at 13:00 -0400, Tanstaafl wrote:
> On Thu Jul 11 2019 15:12:05 GMT-0400 (Eastern Standard Time), Harvey
> Nimmo <harvey@nimmo.de> wrote:
> > Sorry, Tanstaafl!
> >
> > There is a slight error in the above. The formula should read
> > =HOUR(A1)*60+MINUTE(A1)+ROUND(SECOND(A1)/60,0)
> >
> > 'SEC' is the secant function. Also 'MIN' would also be wrong since
> > it
> > calculates the minimum of a set of values.
>
> awesome! Thanks very much Harvey! Worked like a charm...

You're welcome. But Brian Barker's suggestion is both more elegant and
simpler, because it considers takes account of times greater than 24
hours.

Say your time is in cell A1 in text format (e.g. '25:01:50)

Then adding the formula to another cell
=ROUND(a1*1440,0) or just ROUND(a1*1440) gives the right answer (1502),
whereas my previous formula would wrongly return 1 (hour) instead of
25, giving total 62.

Cheers
Harvey






--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.