Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Yes/No Results (XP)

    Hi,

    I working with a report that contains yes/no answers. There are a total of 20 responses, 18 of which are "yes". The formula I'm using in the report is =Sum([provided when scheduled]). I would anticipate an answer of 18 but am getting a -18. I have not set the defaults to anything. I exported it to excel to verify this and in fact found that the Yes=true and the no=false. Am I incorrect in thinking that yes=1 and no =-1??? I need the answer to show a positive 18. Although I can write the formula to allow for this I'd like to understand what is happening.

    Thanks,
    Leesha

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

    Re: Yes/No Results (XP)

    In formulas in Excel, True is 1 and False is 0.
    In VBA (in all applications) and in queries and expressions in Access, True is -1 and False is 0. There is a technical explanation for this that involves the way numbers are stored by computers - see <post#=368140>post 368140</post#> by MarkD.
    To get a positive sum, use =-Sum([...]) or =Abs(Sum([...]))

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Yes/No Results (XP)

    Thanks Hans!! As always I have the need to understand!

    Leesha

Posting Permissions

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