+ Reply to Thread
Results 1 to 3 of 3

How to calculate a sum as one outcome of an IF statement

  1. #1
    barb in NC
    Guest

    How to calculate a sum as one outcome of an IF statement

    I am working on a grade book. The teacher gives 12 quizzes worth 10 points
    each, but the maximum credit allowed for quizzes is 100 points, not the
    mathematically possible 120 points. I think an IF statement is the answer,
    my best try is below:

    IF(>=100, "100", "=L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8")

    This worked on the true contdion, but the false condition is not returning
    the sum, but rather =L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8.

    I have tried all the variations I can think of to tell it to return the sum
    in the false condition (the sum is less than 100), but I can't find the right
    grammar. Removing the quotation marks made the statement invalid, as did
    surrounding the L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8 with parentheses.

    I tried to approach it with a SUMIF statement, but didn't see that as an
    answer, though I admit I was running out of enthusiasm by then. I've tried
    the online help, and as ever, not found the issue addressed. I'd sure
    appreciate any suggestions.

    THANKS!

  2. #2
    N Harkawat
    Guest

    Re: How to calculate a sum as one outcome of an IF statement

    How about simply
    =min(100,(L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8))

    "barb in NC" <[email protected]> wrote in message
    news:[email protected]...
    >I am working on a grade book. The teacher gives 12 quizzes worth 10 points
    > each, but the maximum credit allowed for quizzes is 100 points, not the
    > mathematically possible 120 points. I think an IF statement is the
    > answer,
    > my best try is below:
    >
    > IF(>=100, "100", "=L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8")
    >
    > This worked on the true contdion, but the false condition is not returning
    > the sum, but rather =L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8.
    >
    > I have tried all the variations I can think of to tell it to return the
    > sum
    > in the false condition (the sum is less than 100), but I can't find the
    > right
    > grammar. Removing the quotation marks made the statement invalid, as did
    > surrounding the L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8 with
    > parentheses.
    >
    > I tried to approach it with a SUMIF statement, but didn't see that as an
    > answer, though I admit I was running out of enthusiasm by then. I've
    > tried
    > the online help, and as ever, not found the issue addressed. I'd sure
    > appreciate any suggestions.
    >
    > THANKS!




  3. #3
    barb in NC
    Guest

    Re: How to calculate a sum as one outcome of an IF statement

    thank you, thank you, thank you, thank you, THANK YOU! Worked like a charm.

    "N Harkawat" wrote:

    > How about simply
    > =min(100,(L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8))
    >
    > "barb in NC" <[email protected]> wrote in message
    > news:[email protected]...
    > >I am working on a grade book. The teacher gives 12 quizzes worth 10 points
    > > each, but the maximum credit allowed for quizzes is 100 points, not the
    > > mathematically possible 120 points. I think an IF statement is the
    > > answer,
    > > my best try is below:
    > >
    > > IF(>=100, "100", "=L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8")
    > >
    > > This worked on the true contdion, but the false condition is not returning
    > > the sum, but rather =L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8.
    > >
    > > I have tried all the variations I can think of to tell it to return the
    > > sum
    > > in the false condition (the sum is less than 100), but I can't find the
    > > right
    > > grammar. Removing the quotation marks made the statement invalid, as did
    > > surrounding the L8+O8+R8+U8+X8+AA8+AD8+AG8+AJ8+AM8+AP8+AS8 with
    > > parentheses.
    > >
    > > I tried to approach it with a SUMIF statement, but didn't see that as an
    > > answer, though I admit I was running out of enthusiasm by then. I've
    > > tried
    > > the online help, and as ever, not found the issue addressed. I'd sure
    > > appreciate any suggestions.
    > >
    > > THANKS!

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1