ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Concatenate results without decimals (https://www.excelbanter.com/excel-programming/434119-concatenate-results-without-decimals.html)

kemp

Concatenate results without decimals
 
I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this ?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?

Kevin Smith[_2_]

Concatenate results without decimals
 
You could round the value

=round(A1,0)&"±"&round(A2,0)
--
Kevin Smith :o)


"kemp" wrote:

I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this ?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?


Jacob Skaria

Concatenate results without decimals
 
Kemp, if you dont want to Round the numbers in those cells use

=TRUNC(A1)&"±"&TRUNC(A2)

If this post helps click Yes
---------------
Jacob Skaria


"kemp" wrote:

I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this ?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?


kemp

Concatenate results without decimals
 
Dear Kevin,

Great - thank you very much for helping.

"Kevin Smith" skrev:

You could round the value

=round(A1,0)&"±"&round(A2,0)
--
Kevin Smith :o)


"kemp" wrote:

I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this ?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?


Stefi

Concatenate results without decimals
 
Another solution:
=TEXT(A1,"0")&"±"&TEXT(A2,"0")
Regards,
Stefi


kemp ezt *rta:

I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this ?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?


Rick Rothstein

Concatenate results without decimals
 
You might as well save yourself 3 characters...

=TEXT(A1,"0±")&TEXT(A2,"0")

--
Rick (MVP - Excel)


"Stefi" wrote in message
...
Another solution:
=TEXT(A1,"0")&"±"&TEXT(A2,"0")
Regards,
Stefi


kemp ezt *rta:

I have two results which I want to concatenate in another cell.
I do not want to have decimals with - does anybody know how to avoid this
?

My example is:

A1=23 (cell format set to 0 decimals)
A2=4 (cell format set to 0 decimals)
In formula line for B2 I set:
=A1&"±"&A2

Then cell B2 shows 23,333333±4,122343 but I like it shows 23±4

Can somebody help?




All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com