+ Reply to Thread
Results 1 to 5 of 5

Multiple AND/ OR criteria and summation

Hybrid View

leg_jabber Multiple AND/ OR criteria and... 08-21-2012, 03:31 PM
NBVC Re: Multiple AND/ OR criteria... 08-21-2012, 03:46 PM
leg_jabber Re: Multiple AND/ OR criteria... 08-21-2012, 04:00 PM
NBVC Re: Multiple AND/ OR criteria... 08-21-2012, 04:07 PM
leg_jabber Re: Multiple AND/ OR criteria... 08-22-2012, 01:46 AM
  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    8

    Multiple AND/ OR criteria and summation

    Excuse my ignorance..

    Essentially in column A I have a list of products; for argument sakes vegetables. (Note there are a few thousand unique entries)
    In column B I have a list of the amount of stock we have left of each of the product.

    What I need is to order the products in a set of defined subgroups. Using vegetables as an example I would want to put them all into sub groups based on colour. I know what subgroup each vegetable will go in, but it’s a pain to go through them all, as you may well imagine, so I’m trying to do it by determining a set of rules.

    In column C, I used the equation ‘=LEFT(A:A,5)’ to get the first 5 characters. And based on this can do a SUMIF(C:C, “(a 5 character code I define)”, B:B) and that works fine.

    In column D I use the ‘=RIGHT(A:A,3)’ to get the last 3 characters. What I am looking to sum in one of the subgroups is where the last 3 characters is “IIL” (for example) AND where in column C they have a range of 5 character codes that I want to sum.

    So I’m looking to sum everything in column D with last 3 characters “IIL” which also has column C of “XXXX1” or “XXXX2”.
    I hope the spreadsheet I attach clears up any doubts in my questions. Thank you in advance.

    LJ.

    ---------- Post added at 02:31 PM ---------- Previous post was at 02:30 PM ----------

    Can not actually upload at the moment. So i will try my best to make it as easy as I can for you to help me.
    Last edited by leg_jabber; 08-21-2012 at 04:00 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple AND/ OR criteria and summation

    Try:

    =SUM(COUNTIFS(D:D,"*IIL",C:C,{"XXXX1","XXXX2"}))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Multiple AND/ OR criteria and summation

    Thank you for your reply. 2 questions when putting in the {} brackets, it doesn't allow me to do that. And how does this know to sum the values in column B?

    Thanks again,
    LJ

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple AND/ OR criteria and summation

    To sum column B change to:

    =SUM(SUMIFS(B:B,D:D,"*IIL",C:C,{"XXXX1","XXXX2"}))

    Are you using Excel or OO or GoogleDocs? In Excel, the { entries should work....

    Try copying my formula and pasting it. Does it accept it?

  5. #5
    Registered User
    Join Date
    08-21-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Multiple AND/ OR criteria and summation

    Quote Originally Posted by NBVC View Post
    To sum column B change to:

    =SUM(SUMIFS(B:B,D:D,"*IIL",C:C,{"XXXX1","XXXX2"}))

    Are you using Excel or OO or GoogleDocs? In Excel, the { entries should work....

    Try copying my formula and pasting it. Does it accept it?
    Yeah it works wonderfully. Thank you for your help NBVC. I was just being an idiot.

    Regards,
    LJ

+ 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