+ Reply to Thread
Results 1 to 6 of 6

Compare two cells in a row with Criteria. Count Rows that match Criteria

  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Highland Park, IL
    MS-Off Ver
    Excel 2007
    Posts
    15

    Compare two cells in a row with Criteria. Count Rows that match Criteria

    I've got a task for work and I can't seem to figure it out. Thank you in advance for any assistance provided.

    Here is what I have. 4 Worksheets. The first worksheet is a summary page. I have 350 personnel that are broken down into three different groups. So each group has it's own sheet.

    Here is what I need to accomplish. Results need to be posted on the summary sheet.

    I need to compare cells B2 & D3 for each row on a worksheet and display the number of times they match on a worksheet. For example how many times does EP & EP match on a certain row.

    I need to compare cells B2 & D3 for each row on a worksheeet and display the number of times they don't match on a worksheet. For example how many times does EP & MP occur.

    I've attached an example for reference
    Attached Files Attached Files
    Last edited by Phenatic; 09-22-2009 at 06:13 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Please help... Can figure this one out.

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-11-2007
    Posts
    82

    Re: Please help... Can figure this one out.

    Hi,

    I am not sure this is what you are looking for, but you could try this on your summary sheet:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-22-2009
    Location
    Highland Park, IL
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Compare two cells in a row with Criteria. Count Rows that match Criteria

    I apologize. In my haste to get this solved I did not follow the rules. Please forgive my ignorance. I hope the above is acceptable.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Compare two cells in a row with Criteria. Count Rows that match Criteria

    since colum b always has ep or p or mp
    just count them in col d
    =COUNTIF(EP!D:D,"ep")
    but blank to p is slightly different
    Attached Files Attached Files
    Last edited by martindwilson; 09-22-2009 at 06:12 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    09-22-2009
    Location
    Highland Park, IL
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Compare two cells in a row with Criteria. Count Rows that match Criteria

    Quote Originally Posted by martindwilson View Post
    since colum b always has ep or p or mp
    just count them in col d
    =COUNTIF(EP!D:D,"ep")
    Holy Smokes. I didn't even think about that. I was trying to come up with some complicated formula to figure this out and you came up with a simple explanation.

    I'm smacking my head thinking that I should've known that. But I guess when there is a time crunch on getting it done you forget about the simple stuff.

    Thanks again. Problem solved.

+ 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