Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with calculation (2003)

    I have the following calculation:
    CountY: Abs((NZ([Rcac hlh in],"")="Y")+(NZ([Rcac Hlh Sr in],"")="Y")+(NZ([Rcac Hlh Den in],"")="Y")+(NZ([Rcac Hlh Vis in],"")="Y")+(NZ([Rcac Davis in],"")="Y")+(NZ([Rcac UCCI in],"")="Y")+(NZ([Rcac HMIG in],"")="Y")+(NZ([Rcac MtSt HlH In],"")="Y")+(NZ([Rcac MtSt Sr In],"")="Y"))

    It works but I have to make two changes and I need some syntax help. I need to count Rcac hlh in and Rcac Hlh Sr in as one if either are = to "Y" and the same for MtSt HlH In and Rcac MtSt Sr In to only count as one Y if either of are = to Y. So I need to combine them to equal only one Y. Hope I am making sense. thanks for your help.

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

    Re: Help with calculation (2003)

    Try

    CountY: Abs(((NZ([Rcac hlh in],"")="Y") Or (NZ([Rcac Hlh Sr in],"")="Y"))+(NZ([Rcac Hlh Den in],"")="Y")+(NZ([Rcac Hlh Vis in],"")="Y")+(NZ([Rcac Davis in],"")="Y")+(NZ([Rcac UCCI in],"")="Y")+(NZ([Rcac HMIG in],"")="Y")+((NZ([Rcac MtSt HlH In],"")="Y") Or (NZ([Rcac MtSt Sr In],"")="Y")))

    I replaced the + between the conditions that are to be combined with Or and I placed an extra set of parentheses ( ) around the pairs.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with calculation (2003)

    Thanks for your help...

Posting Permissions

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