Replace "." with "," in Excel 2013 - excel

I have an Excel file, generated from database. It contains a column filled with number values that looks like this:
Values:
123,17
1973,27
12124.97
123.09
-234,01
-732.66
My problem is, that Excel finds numbers only when they are used with "," separator. How can I change all the "." to ",", so all values in that column would be recognized as numbers (aligned to right side of column).
Also, I have a lot of those files to maintain, so an automatic procedure would be highly appriciated.

Select the Column and Hit CRTL+H,
Enter '.' in 'Find What' and enter ',' in 'Replace with' and hit 'Replace All' button

Your data sample looks wrong. It's inconsistent.
If your system uses the comma as the decimal separator, then ALL your numbers should use the comma for the decimal.
If your database system uses a dot as the decimal separator, then ALL your numbers should use the dot for the decimal.
The numbers in your example are a random mix of comma and dot as the decimal separator.
You may want to configure your source system to apply the decimal separator in a consistent way.
It's quite inconceivable why your system would use a comma for one value, but use a dot for another value. You may need to get to the bottom of that logic before you can proceed any further.
Possibly, the "numbers" are really text values from other data sources that use either comma or dot for the decimal separator.

Related

Why when I use text to column Excel changes my numbers

For example I have this line right here:
-2.7769,-5.6967,5.9179,0.37671,1
When I convert text to column using as delimiter comma in preview I see the result just right:
-2.7769 -5.6967 5.9179 0.37671 1
But when I press confirm I get this:
-27.769 -56.967 59.179 0.37671 1
How can I stop it from doing that and get the desired outcome?
I tried to make a line separated with commas into columns using the text to column feature from excel but I didn't get the result I was hoping for.
I don't know the entire solution, but I clearly see that you are mixing up decimal delimiter and thousand delimiter:
I guess that you mean "-2.7769" meaning "minus two, followed by a decimal separator, followed by .7769 (a number between zero and one)", but what your computer understand is: "minus twenty-seven thousand, seven hundred and sixty-nine, but the user has put the thousand separator at the wrong place. I will correct this."
In order to check whether or not your Excel is using a thousand separator, you can ask a random cell's formatting (right-click, choose "Format cells"): the "Use 1000 Separator (,)" checkbox in the "Number" chapter should be unchecked, as in this screenshot:

How to remove all decimal points, but retain value In Microsoft Excel?

I need to display with no decimal, but retaining the numbers that
appear after the last decimal. For example, given `03.1037.190
I tried roundup and trunct but not sure how it works.
Try this on a string where . could be on a dynamic spot
=SUBSTITUTE(A1,".","",LEN(A1)-LEN(SUBSTITUTE(A1,".","")))
Or when your string always follows the same pattern ##.####.####.## you could try:
=REPLACE(A1,13,1,"")
The question is quite unclear as you have a value with the same thousand and decimal delimiter and also 4 numbers between the delimiters. It would help a lot if you specified the actual number without thousand delimiters.
Assuming there are no decimals (31.037.190.301): remove "." using:
=SUBSTITUTE(A1,".","")
and Excel will recognize it as a number

Excel – locale-independent Number Format

I looking for a number format that is locale-independent.
Let's say that I want that my Excel file use an a character as a thousand separator and a b character as a decimal separator on every computer (so this question is not about local Excel settings). The second wish is that the number has always two decimal places.
Can I do this only with a number format without VB code?
After some attempts, I came to this format: ###\a###\a##0\b.00.
1234567.89 > 1a234a567b.89
The problems are:
I must repeat ###\a section and I can not get rid of dot decimal separator (the decimal places are not taken into account without the dot character).
Can I do this only with a number format without VB code?
No.
Even if you can get your separator characters inserted, you will not be able to remove the decimal separator.
The decimal separator is displayed in the cell whenever it is included in custom number display format settings.

How in Excel to Remove only 1st comma (exact character, symbol or string)

I have numbers witch when is 1000 then has comma "," before hundreds like 1,234,00
How to remove 1st comma or make 2nd to appear so it would be 1234,00 or in excel as it works as number if has only space then with space or comma?
I have formula so far for getting number
=MID(LEFT($A604;FIND(" on ";$A604)-1);FIND("?";$A604)+1;LEN($A604))*1
And for removing all i put it in substitute to remove commas but that makes number wrong higher like 123400
=SUBSTITUTE(MID(LEFT($A604;FIND(" on ";$A604)-1);FIND("?";$A604)+1;LEN($A604));",";"")*1
The issue is the format #,##0, puts a comma before every third number. You need to treat it as a string
Try this in B2:
=IF(A2<999,A2,CONCATENATE(MID(A2,1,LEN(A2)-3),",",MID(A2,LEN(A2)-2,3)))
Depending on your use it might be best to remove the IF

Excel Print number with correct decimal Seperator

I use the print function to export a Cell Value to csv file. I use this macro on several PCs with different Localization Settings. The problem i am experiencing is, that on some PCs the Output is 4,11 and 4.11 on others. Is there any Format Method, that allows me always write a Number with a semicolon as decimal Seperator?
As far as I'm aware, there is no format method for changing the decimal separator. Instead your options are temporarily telling Excel to use a special character or using Replace().
Application.UseSystemSeparators = False
Application.DecimalSeparator = ";"
Print #1, rngValue.Text
Or
Print #1, Replace(rngValue, ",", ";")
In either case you then have a problem, when reading the numbers back in, of converting them back to the correct character so they are considered numbers.
A better question might be how do programmers in places that use the comma as the decimal separator handle decimal values in CSV files?

Resources