+ Reply to Thread
Results 1 to 4 of 4

if positive number in one range countif specific value in another range

  1. #1
    Registered User
    Join Date
    04-10-2016
    Location
    georgia
    MS-Off Ver
    2013
    Posts
    2

    if positive number in one range countif specific value in another range

    Hello,

    I have a problem finding a formula for this scenario:

    example data:

    Quantity Color
    1 white
    -1 white
    1 black
    1 white

    in one cell, if value in column Quantity is positive I want to count number of color white in column Color. I came up with this formula:

    =IF(Quantity>0; COUNTIF(Color; "=white")

    but this formula does not seem to be working (I use column names as a substitute of range here for simplicity).


    I hope I explained my problem clearly.
    Anyone has any suggestions?

    Thanks in advance,

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: if positive number in one range countif specific value in another range

    Try it like this...

    =COUNTIFS(Quantity,">0",Color,"White")

    Or, you may have to use semi-colons:

    =COUNTIFS(Quantity;">0";Color;"White")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    04-10-2016
    Location
    georgia
    MS-Off Ver
    2013
    Posts
    2

    Re: if positive number in one range countif specific value in another range

    Quote Originally Posted by Tony Valko View Post
    Try it like this...

    =COUNTIFS(Quantity,">0",Color,"White")

    Or, you may have to use semi-colons:

    =COUNTIFS(Quantity;">0";Color;"White")
    This seems to be working. thx a lot.
    Last edited by sandreli; 04-10-2016 at 07:35 PM.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: if positive number in one range countif specific value in another range

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] how to stop Command button If specific number is entered in a specific cell range
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2013, 05:10 AM
  2. How to use Countif with range and specific filter
    By dystop1a in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2013, 06:56 PM
  3. countif on specific cells not a range.
    By pavlos in forum Excel General
    Replies: 2
    Last Post: 10-08-2012, 11:51 PM
  4. Replies: 4
    Last Post: 06-14-2012, 06:53 AM
  5. VBA Countif from a named range cell to a specific row
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-20-2009, 06:24 PM
  6. =countif(d4:d29,">0")-count all positive #'s in range
    By Mike in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2006, 11:00 PM
  7. [SOLVED] Countif for specific cells rather than a range ????
    By Renee - California in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2005, 03:05 PM
  8. formula to copy last positive number in range of cells
    By rolan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-14-2005, 10:07 AM

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