[Solved] Use of Left Function

Discuss the spreadsheet application
Post Reply
Idrees Khan
Posts: 20
Joined: Thu Feb 02, 2017 6:33 am

[Solved] Use of Left Function

Post by Idrees Khan »

Hello,
I am trying to set use Left Function.
For example:

Code: Select all

Column a          Column b            Column c
0.27±25	        590	              #VALUE!
=left(A1;4)*(B1) its Result Came is #value
please tell me what is mistake.
Thanks
Last edited by Hagar Delest on Tue May 22, 2018 7:57 am, edited 2 times in total.
Reason: tagged solved
OpenOffice 44.1.1 windows
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Use of Left Function

Post by robleyd »

You are trying to multiply a text value (result of the LEFT function) and a number (590)

The VALUE function, used to convert the result of LEFT to number, will give you what you want. Note the brackets around B1 are not needed.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Idrees Khan
Posts: 20
Joined: Thu Feb 02, 2017 6:33 am

Re: Use of Left Function

Post by Idrees Khan »

I want to multiply Column a first 4 digit with column b value
OpenOffice 44.1.1 windows
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Use of Left Function

Post by Lupp »

See viewtopic.php?t=39529.

Entered constants and also the results returned by formulae have a type each.
The LEFT() function returns a result of type 'Text'. To apply a multiplication you need something of type 'Number'.
Try

Code: Select all

=VALUE(LEFT((A1;4))*B1
where the VALUE() function converts the text to a number if possible. The working of VALUE() depends on the decimal separator of your locale. To get your formula to work also in locales using the decimal comma, you need to accept some complications.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
njhub
Posts: 33
Joined: Thu May 17, 2018 8:36 am
Location: Mayotte YT

Re: Use of Left Function

Post by njhub »

Hello, try

Code: Select all

=VALUE(LEFT((A1;FIND(".";A1)+2))*B1
(+2) two digits after dot
LibreOffice (fr_YT): 6.1.4.2 (26/12/2018)
OS : Windows 10.0
Idrees Khan
Posts: 20
Joined: Thu Feb 02, 2017 6:33 am

Re: Use of Left Function

Post by Idrees Khan »

Thank you Lupp for your help
OpenOffice 44.1.1 windows
Post Reply