ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retain decimal places in a concatenate function (https://www.excelbanter.com/excel-programming/413850-retain-decimal-places-concatenate-function.html)

Tobey

Retain decimal places in a concatenate function
 
Hi,

I am trying to take quantity and price from 5 columns and merge them
into one cell:
From Columns Q-U:
67.40 3 192.96 5 288.85

To Column V:
67.4 3 192.96 5 288.85

However, I keep losing my two decimal places in #s like 67.40!
I used the function:
=Q2&" "&R2&" "&S2&" "&T2&" "&U2

How do I retain the two decimal places in my last column?

Thank you so much!



Niek Otten

Retain decimal places in a concatenate function
 
Hi Tobey,

=TEXT(Q2,"0.00")&" "&TEXT(R2,"0.00")&" etc

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Tobey" wrote in message ...
| Hi,
|
| I am trying to take quantity and price from 5 columns and merge them
| into one cell:
| From Columns Q-U:
| 67.40 3 192.96 5 288.85
|
| To Column V:
| 67.4 3 192.96 5 288.85
|
| However, I keep losing my two decimal places in #s like 67.40!
| I used the function:
| =Q2&" "&R2&" "&S2&" "&T2&" "&U2
|
| How do I retain the two decimal places in my last column?
|
| Thank you so much!
|
|



Rick Rothstein \(MVP - VB\)[_2286_]

Retain decimal places in a concatenate function
 
How are Columns Q-U formatted? If they are formatted as text (in order to
keep the trailing zero on the 67.40 value), then your formula works fine for
me. If, on the other hand, you have Columns Q-U formatted to show two
decimal places on real (non-text) numbers, then those zeroes are not really
part of the value (they are part of the display only), and so they cannot be
part of the concatenation. You can change your formula to this and it will
work...

=TEXT(Q2,"0.00")&" "&TEXT(R2,"0.00")&" "&TEXT(S2,"0.00")&" "&
TEXT(T2,"0.00")&" "&TEXT(U2,"0.00")

Rick


"Tobey" wrote in message
...
Hi,

I am trying to take quantity and price from 5 columns and merge them
into one cell:
From Columns Q-U:
67.40 3 192.96 5 288.85

To Column V:
67.4 3 192.96 5 288.85

However, I keep losing my two decimal places in #s like 67.40!
I used the function:
=Q2&" "&R2&" "&S2&" "&T2&" "&U2

How do I retain the two decimal places in my last column?

Thank you so much!





All times are GMT +1. The time now is 07:02 PM.

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