# remove last digit in a column

I have a 10000 cells long collumn full of numbers and i would like to remove only the last digit in each number in collumn.
For example I have number 19856 and i would like to have only 1985

Despite my doubts I dared delete the other instance of this twice posted question.

As a seemingly new user of spreadsheets you might want to learn about a few related basics.
Try [Tutorial] Ten concepts that every Calc user should know (View topic) • Apache OpenOffice Community Forum e.g.

An actual answer to your question only is possible if you tell reliably whether the so-called numbers from you question actually are numbers regarding spreadsheet terminology or texts looking like numbers due to our habit of writing numbers in decimal representation.

In the first case you should also tell in what way the cells containing the numbers are formatted for the display, and mainly if the numbers are assured to be integers.

Another question is concerning the results: Shall they be numbers in the Calc sense or again texts looking like numbers?

… what about numbers ∈ {0,1,2,…,9}? Should the cell value be empty afterwards.

Assumed: the numbers are assured to be integers. We can then rely on automatic conversion, and don’t need to distiguish the cases of text vs actual number.
Given an original in cell A2 e.g. a formula in B2 like

=Int(A2/10) would return the clipped result as a true number.
=TEXT(Int(A2/10(; “0”) would return the respective text.

Having assured a fix length for the given numbers. it also is possible to do the clip for, say, 10000 rows in one go without any formulas in a few seconds. The appropriate tool would then be `>Data>Text to Columns...` using the option `Fixed width`. If leading zeroes need to be processed, the original data must be text.

Hello

assuming you numbers are integers you may use `Edit -> Find & Replace`

Option 1 Single digit values should result in empty cells (see my comment above)

• Menu `Edit -> Find & Replace`
Find: `(\d+)\d\$|(\d\$)`
Replace: `\$1`
Other Options 1: `[x] Current selection only`
Other Options 2: `[x] Regular expressions`
• Click `Replace All`

Option 2 Single digit values should be kept (see comment above)

• Menu `Edit -> Find & Replace`
Find: `(\d+)\d\$`
Replace: `\$1`
Other Options 1: `[x] Current selection only`
Other Options 2: `[x] Regular expressions`
• Click `Replace All`

Important Note I strongly recommend this to test on a copy of your file.

Tested using LibreOffice:

``````Version: 6.4.6.2; Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5;
Locale: en-US (en_US.UTF-8); UI-Language: en-US; Calc: threaded
``````

Hope that helps.

I would suppose Search: `\d\$` and Replace: would do.