Closed Thread
Results 1 to 3 of 3

Count number of times two columns have desired values

  1. #1
    Gavin Deveau
    Guest

    Count number of times two columns have desired values

    I have two adjacent columns, one with cell values of either 20 or 40, the
    other with values of "H", "R" or "D"

    What I want to do is go through and compare the cells of each column, like
    B1 to C1, B2 to C2 etc.

    I want to count how often B# is 40 and C# is "R", B# is 40 and C# is "H" etc.

    I've used countless COUNTIF statements and IF statements and COUNT
    statements... I just can't seem to get a number above 1!

  2. #2
    Ardus Petus
    Guest

    Re: Count number of times two columns have desired values

    =SUMPRODUCT((B1:B1000=40)*C1:C1000="R))

    HTH
    --
    AP

    "Gavin Deveau" <[email protected]> a écrit dans le
    message de news: [email protected]...
    >I have two adjacent columns, one with cell values of either 20 or 40, the
    > other with values of "H", "R" or "D"
    >
    > What I want to do is go through and compare the cells of each column, like
    > B1 to C1, B2 to C2 etc.
    >
    > I want to count how often B# is 40 and C# is "R", B# is 40 and C# is "H"
    > etc.
    >
    > I've used countless COUNTIF statements and IF statements and COUNT
    > statements... I just can't seem to get a number above 1!




  3. #3
    Liz
    Guest

    Re: Count number of times two columns have desired values

    PivotTable

    If you've never done one, use the wizard. Drag your number column to the
    top (drop column fields here), and your letter column to the left (drop row
    fields here). Then drag your letter column into the center of the table
    (drop data columns here), and summarize by COUNT, which it should do by
    default since you're summarizing the letter column.

    "Gavin Deveau" <[email protected]> wrote in message
    news:[email protected]...
    >I have two adjacent columns, one with cell values of either 20 or 40, the
    > other with values of "H", "R" or "D"
    >
    > What I want to do is go through and compare the cells of each column, like
    > B1 to C1, B2 to C2 etc.
    >
    > I want to count how often B# is 40 and C# is "R", B# is 40 and C# is "H"
    > etc.
    >
    > I've used countless COUNTIF statements and IF statements and COUNT
    > statements... I just can't seem to get a number above 1!




Closed 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