+ Reply to Thread
Results 1 to 7 of 7

sum if multiple conditions are met, where order of numbers in array matters

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    washington, dc
    MS-Off Ver
    excel 2010
    Posts
    3

    sum if multiple conditions are met, where order of numbers in array matters

    Hi! I am trying to come up with an excel formula for the following situation:

    I have a table with 1000 rows down and 10 columns across. In the array for each row there could be a number in 1 to 10 of the columns. For each row, if there is a number in column K there must also be a number in columns B,C,D,E,F,G,H,I and J. Similarly if there is a number in column E there must also be a number in B,C and D.

    I need to make a formula that does the following:

    First, it looks to see if any number in B:K of each row is above X. If a number is above X then I need to find out if there is a second number in the row above Y. If there is a number above Y then I need to return the min of that number minus X and another number Z.

    Please let me know if you can help!

    THANK YOU!
    KC

  2. #2
    Registered User
    Join Date
    11-14-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: sum if multiple conditions are met, where order of numbers in array matters

    It will be great if you provide a sample data sheet for your problem. Thanks.

    Regards,
    Vikan

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: sum if multiple conditions are met, where order of numbers in array matters

    Hi Kileyc,

    Suggest you to look into SumIFs or Sumproduct function ... post the workbook in case of any issues, as suggested by Vinoth. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    11-19-2012
    Location
    washington, dc
    MS-Off Ver
    excel 2010
    Posts
    3

    Re: sum if multiple conditions are met, where order of numbers in array matters

    Hi! Thank you both for your help. I attached a sample spreadsheet with some detail.
    Attached Files Attached Files

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: sum if multiple conditions are met, where order of numbers in array matters

    First, it looks to see if any number in B:K of each row is above X. If a number is above X then I need to find out if there is a second number in the row above Y. If there is a number above Y then I need to return the min of that number minus X and another number Z.
    If I look into you attachment in B6:k6.. then I found that C6 is having value as 3000 which is above x i.e., above 500 and it is also above y i.e. above 300.. Now what ? there could be a first number which can be greater than x and then there again could be a first number which is greater than y.. can you put some results manually to make this clear. I am asking this because I don't want to work on assumptions thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  6. #6
    Registered User
    Join Date
    11-19-2012
    Location
    washington, dc
    MS-Off Ver
    excel 2010
    Posts
    3

    Re: sum if multiple conditions are met, where order of numbers in array matters

    Thank you again for your help! I'm sorry my example doesn't make much sense and the formula i tried to make in column q is incorrect.

    If we use row 7 as an example, in column Q i'd like a to find the first number in row 7 that is larger than x, 500 --- in this case it is 3000. In row R I would like to find the first number in row that is larger then Y, starting to the right of the cell that contained the result of the first formula, so starting at C7 instead of B7. So in this case the result would be 800.

    Thank you!

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: sum if multiple conditions are met, where order of numbers in array matters

    starting to the right of the cell that contained the result of the first formula,
    What if the 800 would have been there on the left side of 3000.. then still you searched on the right of 3000 and then the result would had been 8. correct ? thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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