ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Number of digits when merged with text (https://www.excelbanter.com/excel-discussion-misc-queries/208338-number-digits-when-merged-text.html)

Rasmus

Number of digits when merged with text
 
Hi

How do i change the number of digits in the cell if I use this:

=H7 & + " pct."

H7 says "8.7" but the cell gives me "8.67452345345 pct." ?

JE McGimpsey

Number of digits when merged with text
 
One way:

=TEXT(H7,"0.0 pct.")

In article ,
Rasmus wrote:

Hi

How do i change the number of digits in the cell if I use this:

=H7 & + " pct."

H7 says "8.7" but the cell gives me "8.67452345345 pct." ?


Mike H

Number of digits when merged with text
 
Try

=TEXT(H7,"0.0" & + " pct.")

Mike

"Rasmus" wrote:

Hi

How do i change the number of digits in the cell if I use this:

=H7 & + " pct."

H7 says "8.7" but the cell gives me "8.67452345345 pct." ?


Rasmus

Number of digits when merged with text
 
You helped me on the way. Thanks for that,
the right one is:

=TEXT(H7;"0,0") & + " pct."


"Mike H" skrev:

Try

=TEXT(H7,"0.0" & + " pct.")

Mike

"Rasmus" wrote:

Hi

How do i change the number of digits in the cell if I use this:

=H7 & + " pct."

H7 says "8.7" but the cell gives me "8.67452345345 pct." ?


Rasmus

Number of digits when merged with text
 
Thx, allmost right:

=TEXT(I6;"0,0") & + " pct."


"JE McGimpsey" skrev:

One way:

=TEXT(H7,"0.0 pct.")

In article ,
Rasmus wrote:

Hi

How do i change the number of digits in the cell if I use this:

=H7 & + " pct."

H7 says "8.7" but the cell gives me "8.67452345345 pct." ?



JE McGimpsey

Number of digits when merged with text
 
Your change isn't right at all, given that your example used a decimal
point, not a comma.

It's also inefficient - there's no need to add operators and do string
manipulation.

- '&' is the concatenation operator, the '+' is redundant.

- it can be done in one step with the notation you're using:

=TEXT(I6; "0,0 pct.")


In article ,
Rasmus wrote:

Thx, allmost right:

=TEXT(I6;"0,0") & + " pct."



All times are GMT +1. The time now is 06:34 AM.

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