ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Concatenate format (https://www.excelbanter.com/excel-worksheet-functions/145035-concatenate-format.html)

tom

Concatenate format
 
Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE HYPHEN SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also have some
cells that require 2 decimal places and may end in two zeros....I would like
those to have the same format....number space hyphen space number.

Thanks!


DazzaData

Concatenate format
 
=round(a1,1)&" - " &round(a2,1)&" - " &round(a3,1)

Cheers

Darren

-----------------------------------------------------
Please press 'yes' if you found this post useful

"Tom" wrote:

Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE HYPHEN SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also have some
cells that require 2 decimal places and may end in two zeros....I would like
those to have the same format....number space hyphen space number.

Thanks!


Mike H

Concatenate format
 
Tom,

Format the offending 50.0 as text and then concatenate.

=A1&" - "&A2&" - "&A3

Mike

"Tom" wrote:

Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE HYPHEN SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also have some
cells that require 2 decimal places and may end in two zeros....I would like
those to have the same format....number space hyphen space number.

Thanks!


tom

Concatenate format
 
Thanks for the reply, however, this still omits the zero if it is after the
decimal place. I get 50 - 50.1 - 50.2 using what you provided. Any other
suggestions?

"DazzaData" wrote:

=round(a1,1)&" - " &round(a2,1)&" - " &round(a3,1)

Cheers

Darren

-----------------------------------------------------
Please press 'yes' if you found this post useful

"Tom" wrote:

Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE HYPHEN SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also have some
cells that require 2 decimal places and may end in two zeros....I would like
those to have the same format....number space hyphen space number.

Thanks!


Roger Govier

Concatenate format
 
Hi Tom

Try
=TEXT(A1,"#.0")&" - "&TEXT(A2,"#.0")&" - "&TEXT(A3,"#.0")

--
Regards

Roger Govier


"Tom" wrote in message
...
Thanks for the reply, however, this still omits the zero if it is
after the
decimal place. I get 50 - 50.1 - 50.2 using what you provided. Any
other
suggestions?

"DazzaData" wrote:

=round(a1,1)&" - " &round(a2,1)&" - " &round(a3,1)

Cheers

Darren

-----------------------------------------------------
Please press 'yes' if you found this post useful

"Tom" wrote:

Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE
HYPHEN SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also
have some
cells that require 2 decimal places and may end in two zeros....I
would like
those to have the same format....number space hyphen space number.

Thanks!




Bob Phillips

Concatenate format
 
=TEXT(A1,"0.0 - ")&TEXT(A2,"0.0 - ")&TEXT(A3,"0.0")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tom" wrote in message
...
Can someone suggets how to concatenate
50.0 50.1 50.2
into
50.0 - 50.1 - 50.2
That is the number (with one decimal place) followed by a SPACE HYPHEN
SPACE
second number with one decimal place...etc
Everything I try omits the ".0" if it happens to be a zero. I also have
some
cells that require 2 decimal places and may end in two zeros....I would
like
those to have the same format....number space hyphen space number.

Thanks!





All times are GMT +1. The time now is 08:28 PM.

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