+ Reply to Thread
Results 1 to 20 of 20

Countif formula shows value according to cell

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    Oz
    MS-Off Ver
    Excel 2013
    Posts
    63

    Countif formula shows value according to cell

    Hi,

    The formula works correctly for the Countif formula but not for the If formula part.

    How do i change formula to work...please see attached workbook

    Regards

    Andy
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: Countif formula shows value according to cell

    Try this out:

    =IF(OR(A6="T",B6="T"),4,IF(AND(C11="T",D11="T",F11="T"),6,0))
    Last edited by Glenn Kennedy; 09-01-2016 at 11:11 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: Countif formula shows value according to cell

    Do the test for A6, B6 first...

    =IF(OR(A6="T",B6="T"),4,IF(COUNTIF(Sheet1!C11:D11,"T")+(Sheet1!F11="T")=3,6,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    Try this...........=IF(OR(A6="T",B6="T"),4,IF(AND((C11="T"),(D11="T"),(F11="T")),6,0))
    Ash

  5. #5
    Registered User
    Join Date
    04-08-2014
    Location
    Oz
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Countif formula shows value according to cell

    Thanks Glenn & Ash Maverick & Tony Valko

    Very close..only change...If i remove the "T" from C11 or/and D11 then result should = 0 even if there is a "T" in either A6 or B6 or both

    Thanks
    Last edited by andy_tap; 09-01-2016 at 11:15 AM.

  6. #6
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    This is working for me..........=IF(OR(A6="T",B6="T"),4,IF(AND((C11="T"),(D11="T"),(F11="T")),6,0))
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    oh sorry...............got it...........u r saying that if removed from C11 or D11 then the result shud be zero

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: Countif formula shows value according to cell

    That is not what you asked for. I interpreted this:

    "if "T" in C11:D11 & F11 then =6 "

    as meaning T in ALL 3 cells, then 6. Can you re-explain your criteria?

  9. #9
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    you never mentioned that anywhere

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: Countif formula shows value according to cell

    Ash's formula is (in effect) identical to mine. How can it be correct and mine incorrect. Now I really am confused!!!

  11. #11
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    no no............he says mine is also not correct

  12. #12
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    *incorrect

  13. #13
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Countif formula shows value according to cell

    I think this should do it. Now you get 0 if one of C11, D11 or F11 is blank.
    Attached Files Attached Files

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,960

    Re: Countif formula shows value according to cell

    I'm getting my Ash's and Andy's mixed up....

  15. #15
    Registered User
    Join Date
    04-08-2014
    Location
    Oz
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Countif formula shows value according to cell

    Apologies...

    "if "T" in C11:D11 & F11 then =6 " ... yes this is correct.....if then there is a "T" in either A6 or B6 then = 4 ...that worked correctly as well in the formula...

    The formulas posted were correct in there result except i missed saying that if either C11 and D11 are empty then result = 0

    The attached workbook should = 0 as C11 is blank...if d11 was blank and C11 has a "T" should also = 0

    Thanks
    Attached Files Attached Files
    Last edited by andy_tap; 09-01-2016 at 11:26 AM.

  16. #16
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Countif formula shows value according to cell

    Quote Originally Posted by andy_tap View Post
    Apologies...

    "if "T" in C11:D11 & F11 then =6 " ... yes this is correct.....if then there is a "T" in either A6 or B6 then = 4 ...that worked correctly as well in the formula...

    The formulas posted were correct in there result except i missed saying that if either C11 and D11 are empty then result = 0

    Thanks
    If this only applies to cells C11 or D11, then you cant just remove the "isblank(F11) from the formula I created in the sheet above and it should work fine.

  17. #17
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    Try this............=IF(OR(C11<>"T",D11<>"T"),0,IF(OR(A6="T",B6="T"),4,IF(AND((C11="T"),(D11="T"),(F11="T")),6,0)))

  18. #18
    Registered User
    Join Date
    04-08-2014
    Location
    Oz
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Countif formula shows value according to cell

    Thanks Ask.....works fine

    Thank you to all others as well

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

    Re: Countif formula shows value according to cell

    Good deal. Thanks for the feedback!

  20. #20
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Countif formula shows value according to cell

    You are welcome!

+ 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] Formula shows as text in cell entered and result shows in another cell
    By r.coon in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-16-2015, 11:57 PM
  2. Cell shows (t16) formula bar shows (16)
    By syed mudassir in forum Excel General
    Replies: 3
    Last Post: 01-29-2015, 05:27 AM
  3. COUNTIF formula which shows a %
    By dandavis1 in forum Excel General
    Replies: 2
    Last Post: 03-05-2009, 06:07 AM
  4. [SOLVED] cell shows 20. Formula shows 20. why not 540/27
    By griswold in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 04:05 PM
  5. [SOLVED] cell shows 20. Formula shows 20. why not 540/27
    By griswold in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  6. [SOLVED] cell shows 20. Formula shows 20. why not 540/27
    By griswold in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. cell shows 20. Formula shows 20. why not 540/27
    By griswold in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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