calc-learner wrote:@Villeroy - Where do you learn this stuff, man?
I know 4 ways to write new constant values or edit existing values:
1) Keyboard
2) Clipboard (paste, better: paste-special)
3) Import (open foreign file formats, dump other files' data by means of linking)
4) Find&Replace
Having wrong values in spreadsheet cells, you can
1) re-type them using the keyboard
2) copy the right data into the clipboard and paste over the wrong data using appropriate import settings if applicable.
3) re-open the foreign file or replace wrong data links with new data links using appropriate import settings if applicable.
4) replace wrong contents with correct content. Sometimes you replace all commas with points, points with commas, dashes with slashes, spaces with nothing.
Quite often you want to replace all wrongly imported text content (marked with a leading apostrophe) with itself just as if you would re-type all the cells. Regex (regular expression) .+ matches any amount of any kind of characters. The replacement & matches anything that has been matched by the search expression. Replacing regex .+ with & replaces anything with the same anything. The leading apostrophe in the formula bar does not belong to the anything. It is just a tag to denote the numeric content as a literal sequence of characters. 0123 is another character sequence than 123. If both values were numbers, 123 would be the exact same value as 0123 displayed in different number format. There are number formats to display the exact same number in thousands of different ways.
Most users ask about the right formatting option. But formatting does not apply. Formatting displays the
same values in different ways, but we are dealing with plain wrong data. Wrong data formatted to look right would be a very bad idea as soon as you start working with wrong data (calculate, sort, filter etc).
5) You can keep the wrong data and use spreadsheet formulas to calculate the correct values from the wrong ones. If you are lucky, =VALUE(A1) converts any numeric text in A1 into the correct number.