Custom Text Field

S

Sebastian Cordoba

Hi everyone.

In order to add the '%' character to a numeric value, I've created a custom
text field which formula is: CStr([Number1]) + "%".

What I get is a very very long string: 23,2833033710997%, how do I reduce
the lenght to only two decimals: 23,28%

Thnks for your help!
 
S

Sebastian Cordoba

Thanksssssss!!!!!!

Jan De Messemaeker said:
Hi,

Cstr(cint([Number1]*100)/100) & "%"
TH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
Sebastian Cordoba said:
Hi everyone.

In order to add the '%' character to a numeric value, I've created a
custom
text field which formula is: CStr([Number1]) + "%".

What I get is a very very long string: 23,2833033710997%, how do I reduce
the lenght to only two decimals: 23,28%

Thnks for your help!
 
R

Rod Gill

Or if you want 1 or more decimal places:

Format([Number1],"0.0%")


Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Sebastian Cordoba said:
Thanksssssss!!!!!!

Jan De Messemaeker said:
Hi,

Cstr(cint([Number1]*100)/100) & "%"
TH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
Sebastian Cordoba said:
Hi everyone.

In order to add the '%' character to a numeric value, I've created a
custom
text field which formula is: CStr([Number1]) + "%".

What I get is a very very long string: 23,2833033710997%, how do I
reduce
the lenght to only two decimals: 23,28%

Thnks for your help!
 

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