+ Reply to Thread
Results 1 to 9 of 9

Count and many conditions

  1. #1
    Registered User
    Join Date
    01-25-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    49

    Count and many conditions

    Hi

    I am trying to interrogate a spreadsheet to look down two columns comparing only Cells that have P5 in the C column and if column Y is greater than column L - as can be seen below)

    SUMPRODUCT(--(SCHOOL!$C:$C="P5"), --(SCHOOL!Y:YgreaterthanSCHOOL!L:L))

    This produces the number of cells that this applies to but I want to factor in a BUFFER.

    E.g. If the Cell checked in column Y is 5% above that of Column L then count it.

    How do I add this to the formula?

    Nb words used instead of symbol in formula, purely due to filters on this website

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Count and many conditions

    Hi, welcome to the forum

    Sounds like you need to use countifS() function for this. Something like...
    =countifS(SCHOOL!$C:$C,"P5",............
    no, maybe this (untested)

    =SUMPRODUCT(--(SCHOOL!$C:$C="P5"), --(SCHOOL!Y:Y>SCHOOL!L:L)).

    If that doesn't work. please upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    edit: also try and restrict ranges in SP to just what you need - full-column ranges will slow your file down
    Last edited by FDibbins; 01-25-2016 at 04:46 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-25-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    49

    Re: Count and many conditions

    Hi

    =SUMPRODUCT(--(SCHOOL!$C:$C="P5"), --(SCHOOL!Y:Y>SCHOOL!L:L)).

    is what I have except it doesn't say to only include anything where Y:Y is 5% or more larger than L:L

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Count and many conditions

    I must have missed the 5% part....

    =SUMPRODUCT(--(SCHOOL!$C:$C="P5"), --(SCHOOL!Y:Y*1.05>SCHOOL!L:L))

  5. #5
    Registered User
    Join Date
    01-25-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    49

    Re: Count and many conditions

    I think that brought #value but will try again tomorrow at work.

  6. #6
    Registered User
    Join Date
    01-25-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    49

    Re: Count and many conditions

    As suspected #value is the cell response

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Count and many conditions

    Try

    =SUMPRODUCT(--(SCHOOL!$C2:$C100="P5"),--(SCHOOL!Y2:Y100>(SCHOOL!L2:L100*1.05)))

  8. #8
    Registered User
    Join Date
    01-25-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    49
    Quote Originally Posted by JohnTopley View Post
    Try

    =SUMPRODUCT(--(SCHOOL!$C2:$C100="P5"),--(SCHOOL!Y2:Y100>(SCHOOL!L2:L100*1.05)))
    Nope still getting #value

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Count and many conditions

    Value is usually because of wrong data type e.g text not numeric, not the formula.

    Post a sample Excel file which has the problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to count with some conditions
    By qwerty22 in forum Excel General
    Replies: 6
    Last Post: 10-22-2014, 01:09 PM
  2. [SOLVED] Count with two conditions
    By jewellove in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 10:37 AM
  3. Count with 2 conditions
    By lalicom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-16-2009, 03:38 PM
  4. count with two conditions
    By prasjohn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-21-2008, 02:19 PM
  5. SUM/Count if 2 conditions are met
    By mrmiddleman in forum Excel General
    Replies: 4
    Last Post: 07-31-2007, 04:41 AM
  6. Count with 2 conditions, second one OR
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2006, 01:00 PM
  7. Count ifs - 2 conditions
    By Nick in forum Excel General
    Replies: 5
    Last Post: 01-12-2006, 01:10 PM

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