How to remove spaces in calc

I have content in a cell in calc which looks like this:
830 13

I need to remove the space to make it appear lik this

How may I do that?

Your “Karma” should be sufficient for being allowed to attach an example file.

Shall it be done in situ, once and for all?
Use the tool ‘Find & Replace’ , enable the option ‘Regular expressions’,
Put * (a space followed by an asterisk) into ‘Search For’ and leave ‘Replace With’ empty.
Tick ‘Current selection only’ if needed and order ‘Replace All’.
If the result shall not be recognized as a number (but remain text), you may have to select the option ‘Text’ (code @) under ‘Format Cells…’ > ‘Numbers’ > ‘Category’ in advance.

Shall it be done by a formula in another (adjacent?) cell, and be active there even if the original content is changed?
Suppose your text containing the unwanted spaces is in A1. Put into B1 (e.g.) the formula
=SUBSTITUTE(A1;" ";"")
Done! In this case the ‘Numbers’ format of the target cell must not be ‘Text’. The results of SUBSTITUTE are texts anyway, and a formula would not work in a ‘Text’ formatted cell.

My answer is based on the assumption that the original content was text (imported from a csv e.g.).
If the “space” actually was inserted as ‘Thousands Separator’ by number formatting, refer to the answer by @Pierre-Yves Samyn.
You can distinguish the cases using the tool > ‘View’ > ‘ValueHighlighting’ (Ctrl+F8) or by asking =TEXT(A1) in any blank cell.

‘Find & Replace’ with \s+ is more effective. (\s is the RegEx for spaces and space-like characters, and + will select multiple spaces in a row)


I’m not sure because of your example, but this could be the thousands separator: Right clickFormat CellsNumber tab▸untick Thousand separator


@Pierre-Yves Samyn: Out of curiosity: Do you know locales using a space as the ‘Thousands separator’?

@Lupp : french (but I think swiss typography uses an apostrophe), ISO 31-0. See also the second paragraph here.

@Pierre-Yves Samyn: Thank you! In German nowadays often is used the dot (full stop), I am not happy with.
When I was teached a bit about accouning in high-school (in about 1959; time of accounts kept in handwriting or typewriting) we were told not to use a space to prevent forgery. (I do not remember in what way the prefixing of additional digits was prevented.
If I remeber correctly there was a more recent recommendation to use thin_space for the purpose.

@Lupp: yup, space is the standard thousands separator in at least Finnish, Swedish, Norwegian, Danish. Possibly a tonne of other locales.

I didn’t know this next usage of the apostrophe. In fact I am unhappy with any locale hokum concerning data needed in wide-range communication. I consider it a bad idea for software to figure the culture-neutral just because the global community is too lazy (in thinking) to abandon that nonsense.
At least ISO expressly deprecates the point and the comma as well as group separators - and nobody cares.
Its a mess getting worse every day.
(“Small space” was recommended, but is not supported.)