+ Reply to Thread
Results 1 to 6 of 6

IF statements with COUNTIF (including results of countif w/o having it in a separate cell

  1. #1
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Broooklyn, NY
    MS-Off Ver
    Excel 2016
    Posts
    207

    IF statements with COUNTIF (including results of countif w/o having it in a separate cell

    I think my syntax is wrong. Please use asterisk in the solution not AND operator. You don't need array formulas to use asterisk. Here is my formula:

    =IF(((COUNTIF(A1:A2,"Yes"=2))*(A11>4)),"Yes", "No"). So basically, countif sums the result if there is a "Yes". So if the result of countif is equal to 2 and cell A11 has value greater than 4, put Yes, otherwise No. Asterisk in non-array formulas usually works for me. So again, please don't use AND in the formula.

    I am not sure what I am doing wrong. I highlighted the cell where formula resides.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: IF statements with COUNTIF (including results of countif w/o having it in a separate c

    IGNORE , you dont want an AND
    Last edited by etaf; 08-12-2020 at 05:13 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: IF statements with COUNTIF (including results of countif w/o having it in a separate c

    You don’t need an array formula to use AND.

    Your parenthesis looks wrong - there should be a closing bracket after the first "Yes".
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: IF statements with COUNTIF (including results of countif w/o having it in a separate c

    Is this what you want?

    =IF(((COUNTIF(A1:A2,"Yes")=2)*(A11>4)),"Yes", "No")

    You don’t need an array formula to use AND.

  5. #5
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Broooklyn, NY
    MS-Off Ver
    Excel 2016
    Posts
    207

    Re: IF statements with COUNTIF (including results of countif w/o having it in a separate c

    Yes, it work. Thanks..

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: IF statements with COUNTIF (including results of countif w/o having it in a separate c

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. UDF, display filtered results in a separate cell
    By olga6542 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2019, 04:05 AM
  2. [SOLVED] display the results of a filter in separate cell
    By chriswrcg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2018, 04:25 PM
  3. Use Value from separate cell in COUNTIF formula
    By GregM56 in forum Excel General
    Replies: 4
    Last Post: 11-07-2016, 04:25 PM
  4. [SOLVED] Countif Contains including a cell reference
    By Ben1985 in forum Excel General
    Replies: 4
    Last Post: 04-29-2014, 02:27 PM
  5. [SOLVED] VBA - If statements - Multiple criteria (including Cell type)
    By oglion in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-02-2013, 08:43 PM
  6. Replies: 6
    Last Post: 04-05-2011, 09:27 AM
  7. SUM Statements are not including IF
    By Gian S in forum Excel General
    Replies: 1
    Last Post: 02-16-2006, 06:27 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