If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
% calculated but not to two decimals
I have a very simple calculation
Percent = (i/j) *100 That works, but it doesn't expand to two decimals. I want it to be something like 99.38% How can I change the equation above to do that? Thanks Ben |
#2
|
|||
|
|||
% calculated but not to two decimals
Ben assuming its a control open properties for the control
Set Field size to decimal Format to % or fixed depending on how the formula works Precision 4 or 6 ( F1 for more info on this) Scale 2 Decimal places 2 in the properties box select a property and hit F1 and a great description of what the property does will be dispayed. Cheers "Ben" wrote: I have a very simple calculation Percent = (i/j) *100 That works, but it doesn't expand to two decimals. I want it to be something like 99.38% How can I change the equation above to do that? Thanks Ben |
#3
|
|||
|
|||
% calculated but not to two decimals
On Mon, 17 Nov 2008 10:31:01 -0800, Ben wrote:
I have a very simple calculation Percent = (i/j) *100 That works, but it doesn't expand to two decimals. I want it to be something like 99.38% How can I change the equation above to do that? Thanks Ben How about.... =Format((i/j)*100,"#.00") -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
% calculated but not to two decimals
=?Utf-8?B?QmVu?= wrote in
: I have a very simple calculation Percent = (i/j) *100 That works, but it doesn't expand to two decimals. I want it to be something like 99.38% How can I change the equation above to do that? Thanks Ben It's not the equation that needs changing, it's where (how) you are storing the result. You are storing the value in a memory variable or table field which is of integer (or long integder) type. Change the storage to a double precision type and you will have as meny decimals as you wish, which you can cut down to the 2 you want with a format() function. -- Bob Quintal PA is y I've altered my email address. ** Posted from http://www.teranews.com ** |
Thread Tools | |
Display Modes | |
|
|