+ Reply to Thread
Results 1 to 6 of 6

Simplifying A Forumla

  1. #1
    Registered User
    Join Date
    12-07-2007
    Location
    Louisville, KY
    Posts
    3

    Simplifying A Forumla

    I'm developing a spreadsheet for work, and I need to simplify the following formula:

    =IF(AND(B4>0,B4<8),1*A4,0)+IF(AND(B5>0,B5<8),1*A5,0)

    I need it to calculate from B4:B30 and A4:A30, and repeating the formula 27 times just doesn't seem all that efficient. (I currently have it calculated this way, and it does work, but needless to say it's extremely long.)

    To further explain,here is what I'm trying to accomplish:

    Column A equals the unit, which will either be 1 or .5 if it's a split sale. Column B equals the date on which the unit was sold. If the unit is sold within a specified date range (in this instance, the 1st through the 8th), it needs to be added to this cell.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Try this
    =IF(AND(0<B4,B4<8),A4+A5,0)

  3. #3
    Registered User
    Join Date
    12-07-2007
    Location
    Louisville, KY
    Posts
    3
    Quote Originally Posted by mikerickson
    Try this
    =IF(AND(0<B4,B4<8),A4+A5,0)
    Thank you for the prompt response.

    I need it to calculate Column B from B4 through B30 though.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Slycon,

    Does this formula help? (Place in any open cell outside of A4:A30 and B4:B30)
    Please Login or Register  to view this content.
    This will sum every cell in A4:A30 in which B4:B30 is in your range of >0 to <8.

  5. #5
    Registered User
    Join Date
    12-07-2007
    Location
    Louisville, KY
    Posts
    3
    Quote Originally Posted by pjoaquin
    Hi Slycon,

    Does this formula help? (Place in any open cell outside of A4:A30 and B4:B30)
    Please Login or Register  to view this content.
    This will sum every cell in A4:A30 in which B4:B30 is in your range of >0 to <8.
    It works perfectly. Thank you very much!

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    You're welcome, glad I could help out.

+ 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