+ Reply to Thread
Results 1 to 4 of 4

IF Statement combined with COUNTIF Statement

  1. #1
    Registered User
    Join Date
    12-17-2019
    Location
    North Carolina
    MS-Off Ver
    2018
    Posts
    2

    IF Statement combined with COUNTIF Statement

    Hi All,

    I have a list containing 10 values in 10 separate cells, which I have split into 3 groups. I have criteria where no more than 2 cells per group can have values greater than 0.

    I want to combine the formula of =COUNT(IF('RANGE'<>0, RANGE)) which only counts the cell if it has a value that isn't 0, with the formula;

    =IF(COUNT(RANGE)>2,CHAR(251),CHAR(252)

    Can someone advise how I can combine these 2 formulas, and also repeat 3 times for 3 groups.

    I want a cross to appear if any of the 3 groups has a count of greater than 2, not just all of them.

    Thanks in advance for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: IF Statement combined with COUNTIF Statement

    Is this what you want?
    =IF(COUNT(IF('RANGE'<>0, RANGE))>2,CHAR(251),CHAR(252)

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: IF Statement combined with COUNTIF Statement

    Keeping it simple, you could use

    =IF(AND((NOT(COUNTIF(RANGE1,">0")>2)),(NOT(COUNTIF(RANGE2,">0")>2)),(NOT(COUNTIF(RANGE3,">0")>2)),
    OR(COUNT(RANGE1)>2,COUNT(RANGE2)>2,COUNT(RANGE2)>2)),
    CHAR(251),CHAR(252))

  4. #4
    Registered User
    Join Date
    12-17-2019
    Location
    North Carolina
    MS-Off Ver
    2018
    Posts
    2

    Re: IF Statement combined with COUNTIF Statement

    Thanks to you both for your replies.

    Bob, your layout is what I was looking for. Thanks for your help

+ 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. Adding CountIf Statement within If/ElseIf Statement
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 05:09 AM
  2. [SOLVED] Combined IF Statement
    By AndreaJean18 in forum Excel General
    Replies: 3
    Last Post: 09-08-2014, 01:09 PM
  3. [SOLVED] Combined IF Statement
    By AndreaJean18 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2014, 11:41 AM
  4. Help with IF, AND, OR combined statement
    By Justxan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2013, 09:26 AM
  5. If statement and countif statement in an array
    By jntydeman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-26-2011, 12:35 PM
  6. Problem with IF statement within a COUNTIF statement
    By girlofscience in forum Excel General
    Replies: 5
    Last Post: 04-22-2009, 10:20 AM
  7. IF statement combined with AND/OR
    By gillywilly in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2007, 05:30 PM

Tags for this Thread

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