RE: IIf comparison

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Kim

Sorry, I was too hasty. The previous formula will only work if both numbers
are negative or both are positive.

I think this formula will give a better result.

Expr1: IIf([Field1]>[Field2],[Field1]-[Field2],[Field2]-[Field1])

good luck

Trevor

"Kim" wrote:

> I need to write an iif statement (or something else?) that will show a result
> where if the first field is greater in value than the second field, it will
> subtract the first from the second. But if the first field is less in value
> than the second field, I need to reverse the equation to avoid negative
> results. Example -2,000 in first field minus 70,000 in the second field.
> Needing the result to be 68,000.
>
> Thanks
.



Relevant Pages

  • Re: dpkg -l postfix
    ... Every field of this tabular output has a caption. ... The first field is set to "i", so according to the caption, the desired ... action that dpkg sees for this package is "Install". ... The second field is set to "i", which means the current status is ...
    (Ubuntu)
  • Re: Question on how relationships work
    ... Bill, you say "the user does not even see the first field ... ... I have a value list for a drop down field, with OrgID as first value, and OrgName as second value, with only OrgName visible - so far so good. ... I gave you an answer in your other thread, suggesting that you use a drop-down list, with the Person ID number being the first field, and the calculated NameLastFirstSuffix as the second field and the only field visible to the user. ...
    (comp.databases.filemaker)
  • Re: Question on how relationships work
    ... The user does not even see the first field that is ... and the second field is sorted alphbetically. ... You seem determined to avoid this approach as being too cumbersome. ... visible field. ...
    (comp.databases.filemaker)
  • Re: Question on how relationships work
    ... I gave you an answer in your other thread, suggesting that you use a drop-down list, with the Person ID number being the first field, and the calculated NameLastFirstSuffix as the second field and the only field visible to the user. ... You seem determined to avoid this approach as being too cumbersome. ... Bill Collins ...
    (comp.databases.filemaker)
  • Re: Fields in a protected form
    ... Yes, instead of a second field, use a cross-reference to the text of the ... bookmark assigned to the first field and check the "Calculate on Exit" box ...
    (microsoft.public.word.docmanagement)