Forum Discussion
Issues using Ampersand (&) to combine numbers from two different cells
I am trying to combine two different cells that contain numbers into one cell and it is bringing over incorrect values. In my example below the first part of the data is in cell B2 and the second part is in C2. When I combine them in D2 they show the correct numbers:
| Customer | Invoice | Special Inv No |
| 66878799 | 100400661319 | 66878799100400661319 |
When I remove the formula from D2 it is converted to text:
When I convert it to number it changes the combination I had to something that shouldn't be:
| Customer | Invoice | Special Inv No |
| 66878799 | 100400661319 | 66878799100400600000 |
Why is this happening and what can I do to fix it? Is there a different formula I should use for combing numbers in a cell? Appreciate any help!
So, the invoice number is the criteria, right?
Then you can leave it as text but you hit another problem because SUMIF() makes a type conversion from text to number and the result is not correct.
But there is a workaround:
https://newtonexcelbach.com/2017/12/22/the-countif-bug-and-how-to-avoid-it/
4 Replies
- Detlef_LewinSilver Contributor
Excel display only 15 digits (of precision). Any other digit reverts to 0.
Do you have to do further calculations (adding, subtracting, ...)?
If not then leave it as text. Otherwise you may look for other applications or addins which can handle numbers with more than 15 digits.
- Mbala365Copper ContributorI do need to do further calculations as I am using a SUMIF formula to total the amounts received based on the special invoice number. Do you know of any add one as you suggested?
- Detlef_LewinSilver Contributor
So, the invoice number is the criteria, right?
Then you can leave it as text but you hit another problem because SUMIF() makes a type conversion from text to number and the result is not correct.
But there is a workaround:
https://newtonexcelbach.com/2017/12/22/the-countif-bug-and-how-to-avoid-it/