+ Reply to Thread
Results 1 to 6 of 6

IF and conditional sum, one result

  1. #1
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122

    IF and conditional sum, one result

    Hello everybody. I am trying to do something with a spreadsheet and not sure how to work the formula. I have seven columns and seven rows. The column starts at F and the rows start and 1. The formula I have is this:

    =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))

    This is in cell K6. I would like this formula to also be able to look at cells L6 and L7, and if L7 is larger than L6, subtract 1 from result of the formula in K6. Can something like this be done? Thank you in advance for any help that can be given.

  2. #2
    Registered User
    Join Date
    08-18-2005
    Posts
    59

    RE: IF and conditional sum, one result

    Is this it?

    =IF(L7>L6,(IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5))))))-1,IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5))))))
    Excel_Geek
    http://blog.excelgeek.com/

    "...I'll do that in Excel for $50..."

  3. #3
    Biff
    Guest

    Re: IF and conditional sum, one result

    Hi!

    If I understand what you want try this:

    =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))-(L7>L6)

    Biff

    "pboost1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello everybody. I am trying to do something with a spreadsheet and not
    > sure how to work the formula. I have seven columns and seven rows. The
    > column starts at F and the rows start and 1. The formula I have is
    > this:
    >
    > =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))
    >
    >
    > This is in cell K6. I would like this formula to also be able to look
    > at cells L6 and L7, and if L7 is larger than L6, subtract 1 from result
    > of the formula in K6. Can something like this be done? Thank you in
    > advance for any help that can be given.
    >
    >
    > --
    > pboost1
    > ------------------------------------------------------------------------
    > pboost1's Profile:
    > http://www.excelforum.com/member.php...o&userid=11895
    > View this thread: http://www.excelforum.com/showthread...hreadid=398300
    >




  4. #4
    rahrah3a
    Guest

    RE: IF and conditional sum, one result

    try this. I nested your formula within an if statement.

    if (L7>L6,your formula -1, your formula)

    =IF(L7>L6,IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))-1,IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5))))))

    "pboost1" wrote:

    >
    > Hello everybody. I am trying to do something with a spreadsheet and not
    > sure how to work the formula. I have seven columns and seven rows. The
    > column starts at F and the rows start and 1. The formula I have is
    > this:
    >
    > =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))
    >
    >
    > This is in cell K6. I would like this formula to also be able to look
    > at cells L6 and L7, and if L7 is larger than L6, subtract 1 from result
    > of the formula in K6. Can something like this be done? Thank you in
    > advance for any help that can be given.
    >
    >
    > --
    > pboost1
    > ------------------------------------------------------------------------
    > pboost1's Profile: http://www.excelforum.com/member.php...o&userid=11895
    > View this thread: http://www.excelforum.com/showthread...hreadid=398300
    >
    >


  5. #5
    Biff
    Guest

    Re: IF and conditional sum, one result

    Hi!

    If I'm following you correctly then you can shorten your formula to:

    =IF(SUM(K1:K5)<10,SUM(K1:K5),SUM(K1:K5)-LOOKUP(SUM(K1:K5),{10,10;20,20;30,30}))-(L7>L6)

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If I understand what you want try this:
    >
    > =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))-(L7>L6)
    >
    > Biff
    >
    > "pboost1" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> Hello everybody. I am trying to do something with a spreadsheet and not
    >> sure how to work the formula. I have seven columns and seven rows. The
    >> column starts at F and the rows start and 1. The formula I have is
    >> this:
    >>
    >> =IF(SUM(K1:K5)>=30,SUM(K1:K5)-30,IF(SUM(K1:K5)>=20,SUM(K1:K5)-20,IF(SUM(K1:K5)>=10,SUM(K1:K5)-10,IF(SUM(K1:K5)<10,SUM(K1:K5)))))
    >>
    >>
    >> This is in cell K6. I would like this formula to also be able to look
    >> at cells L6 and L7, and if L7 is larger than L6, subtract 1 from result
    >> of the formula in K6. Can something like this be done? Thank you in
    >> advance for any help that can be given.
    >>
    >>
    >> --
    >> pboost1
    >> ------------------------------------------------------------------------
    >> pboost1's Profile:
    >> http://www.excelforum.com/member.php...o&userid=11895
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=398300
    >>

    >
    >




  6. #6
    Forum Contributor
    Join Date
    07-16-2004
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    122

    Thanks everybody

    I appreciate the help, 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