Form Field Calculations

A

Adam Traver

I'm trying to do some fancy stuff in a form field set as a calculation,
but I can't get Word to cooperate properly. I'd like to keep out of
using macros, as I absolutely HATE VB and since these documents will be
traveling to multiple people, I don't appreciate Word popping up dialog
boxes every time the file is opened to let them know there are
potentially dangerous things in the macros.

Here's what I'm trying to do:

I have a field called LoanAmount that is formatted as a number, with
Calculate on Exit checked. I also have fields called AppraisedValue and
PurchasePrice which are also formatted exactly like LoanAmount.
Finally, there is a field called LTV which is a calculation field that
looks like this:

=(LoanAmount / AppraisedValue) * 100

The problem with this calculation is that the LTV is actually
calculated based on the lesser of either the AppraisedValue or the
PurchasePrice field. It's easy enough to add min(AppraisedValue,
PurchasePrice), BUT, PurchasePrice is sometimes blank or zero, and as
such, the calcuation will always return that figure.

What I need it to do is condition for which value is lesser, but still
greater than zero, then plug that into the function.

Can anyone help?

Thanks,
Adam
 
C

Cindy M -WordMVP-

Hi Adam,

Probably, you can use an IF field (bookmarked or nested in a SET field to
generate a bookmark - you may need to try various combinations) to do the
test. Then pick up THAT result for the calculation you're displaying.

VERY rough example:

{ SET CheckVal { IF { PurchasePrice} > 0 "True value" "False Value" } }

CheckVal is the bookmark name you'd use in the later field.
I have a field called LoanAmount that is formatted as a number, with
Calculate on Exit checked. I also have fields called AppraisedValue and
PurchasePrice which are also formatted exactly like LoanAmount.
Finally, there is a field called LTV which is a calculation field that
looks like this:

=(LoanAmount / AppraisedValue) * 100

The problem with this calculation is that the LTV is actually
calculated based on the lesser of either the AppraisedValue or the
PurchasePrice field. It's easy enough to add min(AppraisedValue,
PurchasePrice), BUT, PurchasePrice is sometimes blank or zero, and as
such, the calcuation will always return that figure.

What I need it to do is condition for which value is lesser, but still
greater than zero, then plug that into the function.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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

Similar Threads


Top