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. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 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.

  4. #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
  •