[Solved] Number Extraction From Cell Problem

Discuss the spreadsheet application
Post Reply
SandidgeHayLLC
Posts: 11
Joined: Sun Apr 30, 2017 5:21 am

[Solved] Number Extraction From Cell Problem

Post by SandidgeHayLLC »

I Am Having Some Trouble With A Extraction From Mixed Cells.
I Use A Spreadsheet For Work Where I Can Paste Data In And Sort Through It.
Unfortunately Now I Have Found A Error Which Renders My Sheet Useless When The Cell
I Extract Data From Contains A Comma.

For Example The Cell May Say 296 (NW) And I Get 296 From It Perfectly (Exactly What I Need)
But When The Cell Contains Higher Numbers Over 1,000 Like 1,251 (NW) I Only Get A Single 1 Not 1251

Some Of These Cells Do Contain A Lot Of Text And Some Do Not.

The Formula I Am Using Is Below And I'm Including A Generic Copy Of The Sheet Similar To What I Use So You Can Look And See What's Happening. Any Help Sorting This Issue Out Is Greatly Appreciated!

=VALUE(MID(K17;SEARCH("[0-9]";K17;1);SEARCH("[^0-9]";K17;SEARCH("[0-9]";K17;1))-SEARCH("[0-9]";K17;1)))


I Am Running Open Office 3.3.0 On Windows 7 32 And 64 Bit. I Can't Upgrade As Many Of My Documents Corrupt Under New Versions. I Eventually Plan To Upgrade And Create All New Documents But Until Then I'm Stuck.
Attachments
Extraction Problem.ods
ExtractionProblem
(12.33 KiB) Downloaded 95 times
Last edited by SandidgeHayLLC on Mon Apr 23, 2018 8:54 pm, edited 1 time in total.
Open Office 3.2.1
Windows 7 64 Bit
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Number Extraction From Cell Problem

Post by FJCC »

I notice that in column K there is always a space after the number, so I would use

Code: Select all

=VALUE(LEFT(K17,SEARCH(" ",K17,1)-1))
as the formula in column P.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
SandidgeHayLLC
Posts: 11
Joined: Sun Apr 30, 2017 5:21 am

Re: Number Extraction From Cell Problem

Post by SandidgeHayLLC »

FJCC wrote:I notice that in column K there is always a space after the number, so I would use

Code: Select all

=VALUE(LEFT(K17,SEARCH(" ",K17,1)-1))
as the formula in column P.

Unfortunately On The Sheet I Tried This And Get The Dreaded Err:508
Open Office 3.2.1
Windows 7 64 Bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Number Extraction From Cell Problem

Post by Villeroy »

Replace comma with semicolon.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
SandidgeHayLLC
Posts: 11
Joined: Sun Apr 30, 2017 5:21 am

Re: Number Extraction From Cell Problem

Post by SandidgeHayLLC »

Villeroy wrote:Replace comma with semicolon.

Dang I Didn't Even Notice That! Thank You. Is That Comma Just A Microsoft Thing Versus Open Office?
Open Office 3.2.1
Windows 7 64 Bit
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Number Extraction From Cell Problem

Post by Lupp »

Use the semicolon for separating parameters!
SandidgeHayLLC wrote:Unfortunately On The Sheet I Tried This And Get The Dreaded Err:508
Err: 508 means "unpaired parentheses".

Code: Select all

=IF(K17="";"";VALUE(SUBSTITUTE(LEFT(K17;FIND("(";K17)-1);",";"")))
should do better and will work independent of the separators used for numbers in the locale as long as not a decimal separator is used.

Avoid commas and points as well as group separators. They are explicitly deprecated by ISO 31-0 Sect. 3.3.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Number Extraction From Cell Problem

Post by Villeroy »

Excel and LibreOffice (the successor of OpenOffice) use semicolon as list separator when comma is used as decimal separator and comma when decimals are written with a point.
OpenOffice consistently uses the semicolon as list separator.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply