ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I need 2 digits (concatenate) (https://www.excelbanter.com/excel-programming/368319-i-need-2-digits-concatenate.html)

Zigarlos

I need 2 digits (concatenate)
 
I need a sentence saying: 2 half-time leads in 4 games (66,67%) has resulted
in 1 win.

I've got these cells: (A1=2) (A2=4) (A3=66,67%) and I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3;") has resulted
in 1 win."). But the result is: 2 half-time leads in 4 games
(0,66666666666666667) etc

Then I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3*100;"%) has
resulted in 1 win.") The result: 2 half-time leads in 4 games
(66,666666666666667%) etc

How can I return only 2 digits, so the result is 66,67% ??

Jake Marx[_3_]

I need 2 digits (concatenate)
 
Hi Zigarlos,

Something like this should do what you're looking for:

=FIXED(A1,0) & " half-time leads in " & FIXED(A2, 0) & " games (" &
FIXED(A3*100, 2) & "%) has resulted in 1 win."

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]

Zigarlos wrote:
I need a sentence saying: 2 half-time leads in 4 games (66,67%) has
resulted in 1 win.

I've got these cells: (A1=2) (A2=4) (A3=66,67%) and I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3;") has
resulted in 1 win."). But the result is: 2 half-time leads in 4 games
(0,66666666666666667) etc

Then I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3*100;"%) has
resulted in 1 win.") The result: 2 half-time leads in 4 games
(66,666666666666667%) etc

How can I return only 2 digits, so the result is 66,67% ??




Tom Hutchins

I need 2 digits (concatenate)
 
Try this:

=A1 & " half-time leads in " & A2 & " games (" & TEXT(A3,"0.00%") & ") has
resulted in 1 win."

Or this:

=A1 & " half-time leads in " & A2 & " games (" & TRUNC(A3*100) & "," &
ROUND(MOD(A3,1)*100,0) & "%) has resulted in 1 win."

This first has the percentage as 66.67%. I noticed (late) that your example
wants 66,67%. There is probably a better way to do this, using settings for
local currencies, etc.

Hope this helps,

Hutch

"Zigarlos" wrote:

I need a sentence saying: 2 half-time leads in 4 games (66,67%) has resulted
in 1 win.

I've got these cells: (A1=2) (A2=4) (A3=66,67%) and I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3;") has resulted
in 1 win."). But the result is: 2 half-time leads in 4 games
(0,66666666666666667) etc

Then I tried this:

=concatenate("";a1;" half-time leads in ";a2;" games (";a3*100;"%) has
resulted in 1 win.") The result: 2 half-time leads in 4 games
(66,666666666666667%) etc

How can I return only 2 digits, so the result is 66,67% ??



All times are GMT +1. The time now is 03:46 AM.

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