Problem in displaying number

H

hsg

Having problem in displaying number!

A1=25.25 (outcome of some calculations, formatted as
number with two decimal places)

In A10, I am trying to display

Please pay a sum of Rs. 25.25 only

I am using the formula A10="Please pay a sum of Rs. "&A1&" only"

Problem is coming with amounts like 25.00 or 25.50, the cell displays
for 25.50 ----> Please pay a sum of Rs. 25.5 only (what I want is 25.50)
for 25.00-----> Please pay a sum of Rs. 25 only (what I want is 25.00)

separating Integar and Fraction part is not of help. Using =right(a1,1) also
does not work.

Help will be appreciated, preferably with use of functions only!
 
R

Ron Rosenfeld

Having problem in displaying number!

A1=25.25 (outcome of some calculations, formatted as
number with two decimal places)

In A10, I am trying to display

Please pay a sum of Rs. 25.25 only

I am using the formula A10="Please pay a sum of Rs. "&A1&" only"

Problem is coming with amounts like 25.00 or 25.50, the cell displays
for 25.50 ----> Please pay a sum of Rs. 25.5 only (what I want is 25.50)
for 25.00-----> Please pay a sum of Rs. 25 only (what I want is 25.00)

separating Integar and Fraction part is not of help. Using =right(a1,1) also
does not work.

Help will be appreciated, preferably with use of functions only!

You need to use the TEXT function to properly format the value within the
string. e.g.

="Please pay a sum of "&TEXT(A1,"""Rs. ""#0.00") & " only"

--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top