Adding two numbers as decimal

valmir

Board Regular
Joined
Feb 10, 2021
Messages
235
Office Version
  1. 365
Platform
  1. Windows
Hello everyone! I wonder if there is a way in excel to add two numbers and have the result as a decimal number in which the first number will be the whole number part and the second number will be the decimal number part. Example: I have "2" in column A and "5" in column B, the result in column C will be "2,5". I tried to do this with this formula
=TEXTJOIN(","; TRUE; A1:B1)
But the result does not come as number, but rather as text and behaves as text which does not serve my purpose.
Thanks
 
Copy formula from my post 7 to new sheet. Check on default cell format.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I'm glad that you found this as solution, but now I see Arthurbr's formula also correct and much more simple.
 
Upvote 0
I'm glad that you found this as solution, but now I see Arthurbr's formula also correct and much more simple.
Thank you. OP's have the tendency to look at the last answers not the first ones. It's been frustrating me for years on forums...
 
Upvote 0
Wow! I never thought that this would be so hard to achieve. I tried all those formulas and none of them is working. For example when adding "0" and "3" I was supposed to get 0,3 but I am getting 0 as the result
Are you sure my suggestion does not work?? It does for me and does not need more than one function :mad:
 
Upvote 0
I don't think such a complicated formula is needed. This worked for me...

=0+TEXT(A1&"."&B1,"General")

Note: My decimal point is a dot... yours seems to be a comma so you might have to use that instead.
 
Upvote 0
Are you sure my suggestion does not work?? It does for me and does not need more than one function
I'm sorry Sir, your suggestion works perfectly. It is my fault. I am not so knowledgeable in excel so at the time when I was trying your formula I had the wrong formatting. It wasn't until someone told me about the formatting that I got it working. Again I am sorry but as a "not-so-regular" excel user sometimes we tend to neglect or forget about basic things. Thanks again for your help
 
Upvote 0
Actually, the formula can even be simpler...

=0+(A1&"."&B1)

Note: Again, my decimal point is a dot... yours seems to be a comma so you might have to use that instead.
 
Upvote 0
Also nice formula Mr Rothstein, especially part ->converting text format to number by adding zero.
Is it formatting necessary?
I found this formula gives well result.
=IFERROR(0+(A1&"."&B1),"").
Ha, Ha. We still thinking.
 
Upvote 0
Also nice formula Mr Rothstein, especially part ->converting text format to number by adding zero.
Is it formatting necessary?
I found this formula gives well result.
=IFERROR(0+(A1&"."&B1),"").
Ha, Ha. We still thinking.
I actually tried Mr. Rothstein's formula but it is not working for me. This one that your just posted works too.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top