I want NumberValue 70 from 70Km in Calc?

I have Used 3 Calc Functions, Separate To get 70 as Number … from 70Km. But, I want Combine all the 3 calc functions to get that RESULT 70.

Here is the Screen shot.
image

Any Idea …?

Hallo

=NUMBERVALUE(LEFT(D14;FIND("K";D14)-1))
1 Like

Hi Karolus,

Thanks Karolus… Its Working…
But…
What about Substitute Functions… Is it Possible to Combine All the Three Functions…? because I got error, while Combine the Functions…

=NUMBERVALUE(SUBSTITUTE(D14;"Km";""))
5 Likes

Edited to retract my question as I changed my search slightly and found the answer myself in the LO resources. Thank you for the above information!

One other possibility.
Format column D as #,###.#"Km" (remove or replace comma and decimal point depending on formatting of other numbers and local use, even #"Km" would work)
Select column and click Edit > Find & Replace
Tick Current selection and Regular Expressions
In Find enter ^.
In Replace enter &
Click Replace all
the 70Km will be converted to number 70 with Km present as formatting only.

4 Likes

The S.I. units must write with Space between the numeric value and the unit string (except the the angular Degrees ° - the percent % is not an SI unit)

From the Wiki: Space (punctuation) - Wikipedia

Unit symbols and numbers

Main article: International System of Units § Lexicographic conventions

The International System of Units (SI) prescribes inserting a space between a number and a unit of measurement (the space being regarded as an implied multiplication sign) but never between a prefix and a base unit; a space (or a multiplication dot) should also be used between units in compound units.[23]

5.0 cm, not 5.0cm or 5.0 c m or 5.0 cms

45 kg, not 45kg or 45 k g or 45 kgs

32 °C, not 32°C or 32° C

20 kN m or 20 kN⋅m, not 20 kNm or 20 k Nm

π/2 rad, not π/2rad or π / 2 rad

50 %, not 50% or 50 percent (Note: % is not an SI unit, and many style guides do not follow this recommendation; note that 50% is used as adjective, e.g. to express concentration as in 50% acetic acid.)

The only exception to this rule is the traditional symbolic notation of angles: degree (e.g., 30°), minute of arc (e.g., 22′), and second of arc (e.g., 8″).

The SI also prescribes the use of a space[24] (often typographically a thin space) as a thousands separator where required. Both the point and the comma are reserved as decimal markers.

Yes. Not confirmed to in original data. Once the text had been converted to formatted number then the formatting can be changed to #,###.# "Km" or just changed to number with Km in the heading

1 Like