Extracting characters from a cell into another one

Discuss the spreadsheet application

Extracting characters from a cell into another one

Postby jarmilavdw » Fri May 16, 2008 11:51 am

Hi,

Would anybody know how to do the above? Let's say in cell A1 I have the following: '00:15:26' and I need to extract the last 2 characters. Normally in Microsoft Excel I would use the following formula: =right(A1,2). Would anybode know how to do it in Open Office as I have given up on searching for it in Open Office help.
jarmilavdw
 
Posts: 1
Joined: Fri May 16, 2008 11:24 am

Re: EXTRACTING CHARACTERS FROM A CELL INTO ANOTHER ONE

Postby Villeroy » Fri May 16, 2008 12:05 pm

If the value is a literal text, then RIGHT will return the last characters. Since your time value seem to be a formatted number, RIGHT will return the last digits of that number.
What you want to get (although you did not tell us) seems to be =SECOND(A1).
All dates and times are formatted numbers. You can format any number as date and/or time. For demonstration purposes, try =PI() with number format "YYYY-MM-DD HH:MM:SS".
or try a sequence like:
-1
-0.75
-0.5
-0.25
0
0.25
...some dozends or rows...
and format as date/time "YYYY-MM-DD HH:MM:SS".
This enshures that you can calculate easily with dates and times as numbers in unit "Days".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28544
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Calc

Who is online

Users browsing this forum: No registered users and 11 guests