[Solved] Extract numbers to a character

Discuss the spreadsheet application
Post Reply
edneco
Posts: 1
Joined: Fri Aug 05, 2022 12:43 pm

[Solved] Extract numbers to a character

Post by edneco »

Hello everyone. I have a doubt that I can´t solve it and need some guidance here.

I want to put in another cell the numbers before the point. And in another cell the numbers after the point.

Example:

A1 - 1124.2356
B1 - 1124 (what I want)
C1 - 2356 (what I want)

How can I put this in a formula? I´ve been trying with Left and Right formulas (with search function in the middle) but when I change the numbers (like 112.23) it won´t work properly. Sometimes appears with the point or sometimes is missing a number.

Can you, guys, help me on this?

Thank you in advance for any help.

Best regards,
Eduardo
Last edited by MrProgrammer on Tue Aug 16, 2022 5:29 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
OpenOffice 3.1 on Windows 10
User avatar
robleyd
Moderator
Posts: 5500
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Extract numbers to a character

Post by robleyd »

For B1, one possibility:

Code: Select all

=LEFT(A1;SEARCH("\.";A1)-1)
I'll leave the other half of the question as an exercise for the student :D
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.2.2; SlackBuild for 26.2.2 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Post Reply