+ Reply to Thread
Results 1 to 6 of 6

Countif

Hybrid View

  1. #1
    Registered User
    Join Date
    06-28-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    15

    Countif

    Hi,

    First off, just to let you guys know, I am using Excel 2003.

    My problem involves, what I believe should be the COUNTIF function. Essentially, I want to use to count based on two "ifs". In other words, I want to count the number of "1"s in column C, as long as it also has a "1" in column A. I want to proceed by doing the number of "1"s in column C, with a "2" in column B, and etc.

    I was thinking of using 2 COUNTIF's, but I do not believe that is the way to go. I also tried using an IF and a COUNTIF, but that did not seem to work either.

    The second question I have is how to make the window inside the window. I remember briefly seeing one, but what I mean is cutting a table off from the rest of the spread sheet so that it has its own separate scroll bars.

    Thank you very much for your help.

  2. #2
    Registered User
    Join Date
    06-28-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Countif

    boyntoni,

    use this formula....

    =SUM(IF(A1:A7=1,IF(C1:C7=1,1,0),0))

    You need to press an hold CTRL and Shift when you press Return to get the {} mark's around the formula so it looks like the below.

    {=SUM(IF(A1:A7=1,IF(C1:C7=1,1,0),0))}

    You can change the ranges in red to suit (both need to cover the same amount of rows) and you can change the criteria in blue as well e.g. look for 2's

    The first IF will check to see if column A contains a 1
    The second IF will check to see if column C contains a 1
    If they both meet the criteria it will count as 1, this will be applied and totaled for the ranges given.

    Sxhall

  3. #3
    Registered User
    Join Date
    06-28-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Countif

    Thanks so much for the help.

    Just out of curiosity, why are the { } necessary?

    Also, any idea on the window within the window?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Countif

    This instead:

    =SUMPRODUCT(--(A1:A7=1),--(C1:C7=1))

    will allow you to ENTER normally...

    For second question, do you mean Window|Split?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    06-28-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Countif

    For the SUMPRODUCT - How would I enter it exactly, or, what would be in place of the --?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Countif

    You enter it as per my formula...leave the -- 's . These are coercers... they coerce TRUE/FALSE to 1/0.

    All you need to change is the ranges to cover and the 1's to whatever you want to test.

+ 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