Home > Software engineering >  How to extract the first two digits from the right side of decimal point?
How to extract the first two digits from the right side of decimal point?

Time:03-04

In this example, I am attempting to extract the digits, "44", from "2330.44".

Subtracting the truncated value, "2330", from the original value gives me one form of this (see photo below - Cell reference I14 holds the value, "2330.44"). However, this is not what I am looking for.

enter image description here

Is there a way to either:

A) Remove the "0" and "." from "0.44".

B) Extract first two digits after decimal point more efficiently.

CodePudding user response:

There are many options, including using MOD and TRUNC:

=TRUNC(MOD(I14,1)*100)
  • Related