openoffice-calc

Ignore any number in the tenth position in Open Offic Calc


I am trying to right a script for a current project but I need it to note display the number in the tenth position.

For example,

A1 = 9 A2 = 3

=SUM(A1+A2)

Would be 12

How ever how can I get it to display only 2? The numbers will change with each entry. Sometimes it could be 9+45= 54 however I would want it to display only 4. Not sure how I would go about making it take away the number only in the tenth position.


Solution

  • You can trasnform number to string then take last number. Something like this:

    C1 = SUM(A1 + A2)
    RIGHT(TEXT(C1,0),1)
    

    The result is 2