+ Reply to Thread
Results 1 to 6 of 6

IF and COUNTIF Together

  1. #1
    Registered User
    Join Date
    02-09-2005
    Posts
    79

    IF and COUNTIF Together

    I have a problem where I have to check for two conditions, one using IF and another using COUNTIF. If both are true, then calculation is done to get a value. If not, the value should be zero. I have given the code below which is not working properly. Can someone please help me how to handle this? Thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Is this the answer?

    Please Login or Register  to view this content.
    Put the sheet names in as well
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    02-09-2005
    Posts
    79
    Thanks. this works fine.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to hear it - thanks for the feedback

  5. #5
    Registered User
    Join Date
    02-05-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: IF and COUNTIF Together

    Hi, Could you help me?

    I made a formula:

    =COUNTIFS(brut!$B:$B;"1T";brut!$G:$G;"F25"; brut!$C:$C;"1") and it works fine, but I need four more conditions - brut!$C$C; "2", brut!$C$C; "3", brut!$C$C; "4" and brut!$C$C; "5".

    When I change the formula to =COUNTIFS(brut!$B:$B;"1T";brut!$G:$G;"F25"; brut!$C:$C;"1"; brut!$C$C; "2"; brut!$C$C; "3"; brut!$C$C; "4"; brut!$C$C; "5") it didn't work anymore.

    I dont't know how to use IF and COUNTIFS together.

    Thanks in advance,

    regards from Brazil

  6. #6
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: IF and COUNTIF Together

    Quote Originally Posted by asterobelix View Post
    Hi, Could you help me?

    I made a formula:

    =COUNTIFS(brut!$B:$B;"1T";brut!$G:$G;"F25"; brut!$C:$C;"1") and it works fine, but I need four more conditions - brut!$C$C; "2", brut!$C$C; "3", brut!$C$C; "4" and brut!$C$C; "5".

    When I change the formula to =COUNTIFS(brut!$B:$B;"1T";brut!$G:$G;"F25"; brut!$C:$C;"1"; brut!$C$C; "2"; brut!$C$C; "3"; brut!$C$C; "4"; brut!$C$C; "5") it didn't work anymore.

    I dont't know how to use IF and COUNTIFS together.

    Thanks in advance,

    regards from Brazil
    This thread will now be marked as SOLVED, as the OP is satisfied with the solution provided for their specific problem

    Please continue your quest to a solution for your problem in your own thread -> http://www.excelforum.com/excel-form...ame-range.html

    It helps to keep the forums neat and tidy, one problem per thread is enough

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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