+ Reply to Thread
Results 1 to 2 of 2

Count if criteria is met

  1. #1
    Registered User
    Join Date
    02-18-2005
    Posts
    44

    Count if criteria is met

    I have a table (Table 1) with several of the same branch numbers that appear many times and a Y or N field. What I am trying to do is if the branch number in Table 1 matches the branch number in Table 2 count the number of Y in the Y or N field from table 1. What would be the best formula to accompish this?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    Presuming for the sake of discussion, the branch number you want to look at is in E1, and the list of branch numbers is A1:A9, and the list of Y/N is in B1:B9, the following array will give you what you're after

    =COUNT(IF(A1:A9=E1,IF(B1:B9="Y",1,""),""))

    Remember to use CTRL, SHIFT and ENTER to confirm an array (it should display in the formula bar like this)

    {=COUNT(IF(A1:A9=E1,IF(B1:B9="Y",1,""),""))}
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

+ 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