+ Reply to Thread
Results 1 to 3 of 3

If statement with CountIf

  1. #1
    Registered User
    Join Date
    11-27-2014
    Location
    Washington, DC
    MS-Off Ver
    2013
    Posts
    2

    If statement with CountIf

    Hello everyone! I'm stuck and could use some help from someone more advanced than I!

    I am in a situation where I have a column that I need to either report a 1 if it equals another column, otherwise it is a zero. I have that part down quite nicely, but I also need the formula to return a zero if the deciding cell is blank.

    For example;

    =IF(E2=K2,1,0) is the formula I have now

    But I also need it to return a 0 if K2 is blank...

    Please help?

    Thanks!

    Casey Craig
    Washington, DC

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: If statement with CountIf

    =if(k2="",0,if(e2=k2,1,0))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-27-2014
    Location
    Washington, DC
    MS-Off Ver
    2013
    Posts
    2

    Re: If statement with CountIf

    Worked very well, thanks very much!

+ 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. countif statement
    By turnej in forum Excel General
    Replies: 3
    Last Post: 11-03-2011, 09:29 AM
  3. 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
  4. Problem with IF statement within a COUNTIF statement
    By girlofscience in forum Excel General
    Replies: 5
    Last Post: 04-22-2009, 10:20 AM
  5. Countif Statement
    By souchie40 in forum Excel General
    Replies: 3
    Last Post: 05-04-2006, 12:50 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