FormatNumber - How to hide comma as decimal seperator? - excel

OK this is really bugging me now.
We use comma as decimal seperator and I want to hide it if decimals are 0.
How do you do that?
For example for number: '15.213.122,00'
I would like to show just '15.213.122' and not '15.213.122,'
#.###,## Doesn't work. This might work for english muberics tho: #,###.##

Excel does it for you if you set the formatting to "General". Unless you want some special format, which requires something else.

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

How to put comma in a number excel

I have two numbers : 7,8 and 6,8.
When I multiply these numbers I get #VALUE!. I know, this happens because excel thinks, these numbers are strings because of the comma. But i cannot use separator . (point) because in my task, numbers are with , (comma). I tried different number functions, but all of them converts numbers with point (eg. 7.8 , 6.8). What I need to do? Thanks for advices.
To multiply them as whole numbers, use:
=SUBSTITUTE(A1,",","")*SUBSTITUTE(B1,",","")
to display 5304. To multiply as decimal fractionals, use:
=SUBSTITUTE(A1,",",".")*SUBSTITUTE(B1,",",".")
to display 53.04
Go to Advanced Options
Deselect "Use System Separators"
Fill in comma for decimal and space for thousands
Now you can do it:
This will make the change for all Excel documents.
An alternative, which will make the change throughout your system, would be to change your Windows Regional settings the same way. Be sure to change both number and currency if you do that.

Excel not recognising a number

for some reason my excel drops error when multyipling on if statemtn
for example
=IF(A1>B1;A1*5;A1)
I cant do nothing, if Id skip it as 5x5 for exmaple, than it works perfect, though If I use an cell for a multiply, it drops me Value error.
I examined it and calculation steps are:
=IF(TRUE;"20.00"*5;A2), the 20.00 is what is A2 cell.
=IF(TRUE;#VALUE!;A2)
So I am stuck and broken...
This is strange. When multiplying a string that looks like a number, Excel normally automatically converts the string to a number. Try this to force conversion:
=IF(A1>B1;VALUE(A1)*5;A1)
If that still results in an error, then Excel can't recognize "20.00" as a number. Does your locality use a comma instead of a fullstop for the decimal places? If so, try putting 20,00 in A1.
Also, try checking your locality settings. From the Start menu, search for Locality or Language, then choose to change your Date, Time or Number Formats. Click Additional settings and check what your Decimal Symbol is. You need to use this decimal symbol in Excel for it to correctly recognize numbers.
Please use this formula,
=IF(A1>B1,PRODUCT(A1,5),A1)

How to convert 14 bit Hex to Decimal

I need to be able to convert 047C1BEA3A2480 into Decimal. This should convert to 1262359242482816. I have a large amount of hex numbers that need converting so would need a formula or VB script.
I have tried some things including a VB Module, however with this I need to prefix the number with 0X but then gives me a decimal number that is out by 4.
Any ideas would be great.
Use the inbuilt CDec function
Debug.Print CDec("&H" & "047C1BEA3A2480")
This will give you 1262359242482816
Screenshot
Split into 2 7-digits and use the HEX2DEC function. Unfortunately, Excel cannot handle that big a number, so it is rounding when you put it back in Excel. For exmaple, try to paste the decimal version into Excel. But if you want the formula anyway.
=HEX2DEC(LEFT(A4,7))*16^7+HEX2DEC(RIGHT(A4,7))
Otherwise, use Siddarth's solution and put it in Excel as Text.

Resources