PDA

View Full Version : [SOLVED:] Conditional Calculation



oleg_v
12-26-2009, 11:30 PM
hi

i need help with calculation in the word table:

if the number is greater then value in cell "b2" and lower then value in cell "c3"

write "pass" else "fail"

Tnx

macropod
12-27-2009, 03:39 AM
Hi oleg_v,


if the number isWhich number is that (ie in what cell does it appear)?

oleg_v
12-27-2009, 04:34 AM
The number is in the cell"A4"

oleg_v
12-27-2009, 05:05 AM
Hi

All the cell locations are in ms word table.

macropod
12-27-2009, 12:44 PM
Hi oleg_v,

You could use a formula field coded as:

{=(A4>B2)*(A4<C3) \# "Pass;;Fail"}

For more information on field calculations in Word, check out my Word Field Maths Tutorial, at:
http://lounge.windowssecrets.com/index.php?showtopic=365442 (mhtml:{2603C627-B617-484B-B3E3-521BCFB808E8}mid://00000149/!x-usc:http://lounge.windowssecrets.com/index.php?showtopic=365442)
or
http://www.gmayor.com/downloads.htm#Third_party (http://www.gmayor.com/downloads.htm#Third_party)

שָׁלוֹם עֲלֵיכֶם

oleg_v
12-27-2009, 10:05 PM
Hi

Nice Hebrew :thumb

It works great.

Tnx

oleg_v
12-27-2009, 10:32 PM
Hi Sorry
How can I calculate number with 3 or 4 decimal places
Same formula it works great

macropod
12-28-2009, 03:43 AM
Hi oleg_v

That formula only returns what is in effect a True/False (1/0) result. What is it that you want to calculate?

For math formulae in general, the level of precision displayed can be controlled via numeric picture switches. For example, suppose you want to calculate A1/B1, to 4 decimal places. To control number formatting:
. create the field pressing Ctrl-F9 to create the field braces and type {=A1/B1 \# 0.0000};
. position the cursor anywhere in this field and press F9 to update it.

Note: The '\# 0.0000' in the field is referred to as a numeric picture switch. Other possibilities include:
. \# 0 for rounded whole numbers
. \# ,0 for rounded whole numbers with a thousands separator
. \# ,0.00 for numbers accurate to two decimal places, with a thousands separator
. \# $,0 for rounded whole dollars with a thousands separator
. \# "$,0.00;($,0.00);'-'" for currency, with brackets around negative numbers and a hyphen for 0 values

The precision of the displayed value is controlled by the '0.0000'. You can use anything from '0' to '0.000000000000000'.

If you use a final ';' in the formatting switch with nothing following, (eg \# "$,0.00;($,0.00);") zero values will be suppressed.

oleg_v
12-28-2009, 04:08 AM
thanks
every thing is working perfect

שלום