Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Feb 2004
    Location
    Jacksonville, Florida
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If/And Statement (9.0/2001)

    I'm trying to create a formula that says if [% Compl]>0 and [original]=1, then return a 1, else 0: this is the formula I used:
    ACT_STARTS: IIf(([% COMP]>0 & [ORIGINAL]=1),1,0) but it's returning everything as a 0, can anyone help?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If/And Statement (9.0/2001)

    try :
    ACT_STARTS: IIf(([% COMP]>0 And [ORIGINAL]=1),1,0)
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If/And Statement (9.0/2001)

    The & operator is meant to concatenate strings:

    strFirst = "Woody"
    strLast = "Leonhard"
    strTotal = strFirst & " " & strLast

    This results in "Woody Leonhard".

    You need the And operator:

    IIf([% COMP]>0 And [ORIGINAL]=1,1,0)

    Note: although it is allowed, I would never include a % in a field name (and I avoid spaces too.) Sometimes, using special characters can lead to unexpected results.

  4. #4
    Star Lounger
    Join Date
    Feb 2004
    Location
    Jacksonville, Florida
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If/And Statement (9.0/2001)

    Yes! it worked, thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •