+ Reply to Thread
Results 1 to 3 of 3

multiple criteria in count function

Hybrid View

  1. #1
    Registered User
    Join Date
    05-31-2007
    Posts
    9

    multiple criteria in count function

    I need some assistance in getting this formula right. Here is my objective
    WORKSHEET (WS) 1
    A.............B.............C.......D.......E
    1XLast N.......First N......#
    2XLast N.......First N......#
    3YLast N.......First N......#
    4ZLast N.......First N......#

    WORKSHEET (WS) 2
    A.............B.............C.......D.......E
    1 # #
    2XLast N.......First N.....count instances from WS1 that = WORKSHEET2A1and XLast Name and XFirst Name
    3YLast N.......First N.....same as above but for YLast Name and YFirst Name
    4ZLast N.......First N.....same as above but for ZLast Name and ZFirst Name

    I need the formula for the Worksheet 2 C cells to look for the WS2XLast Name, WS2XFirst Name with a value of WS2A1 in the C Column of WS1 and count them.

    I hope this makes sense. Every if statement and Vlookup try doesn't seem to work.

  2. #2
    Forum Contributor Lotus123's Avatar
    Join Date
    11-07-2005
    Location
    Texas
    MS-Off Ver
    2007
    Posts
    153
    I'm not 100% clear, but I believe this is what you are looking for:

    This would be in cell C2 of sheet2 if I understand correctly:
    =SUMPRODUCT((Sheet1!$A$1:$A$10=Sheet2!A2)*(Sheet1!$B$1:$B$10=Sheet2!B2)*(Sheet1!$C$1:$C$10=Sheet2!$A$1)*(1))

    Cell C3:
    =SUMPRODUCT((Sheet1!$A$1:$A$10=Sheet2!A3)*(Sheet1!$B$1:$B$10=Sheet2!B3)*(Sheet1!$C$1:$C$10=Sheet2!$A$1)*(1))

    Cell C4:
    =SUMPRODUCT((Sheet1!$A$1:$A$10=Sheet2!A4)*(Sheet1!$B$1:$B$10=Sheet2!B4)*(Sheet1!$C$1:$C$10=Sheet2!$A$1)*(1))

    Based on this information:
    X-Last X-First 1
    X-Last X-First 2
    Y-Last Y-First 3
    Z-Last Z-First 5
    X-Last X-First 1
    X-Last X-First 2
    Y-Last Y-First 3
    Z-Last Z-First 1
    X-Last X-First 1
    X-Last X-First 2

    The values returned were 3, 0, and 1 respectively.

    X-Last X-First 1 MATCH
    X-Last X-First 2
    Y-Last Y-First 3
    Z-Last Z-First 5
    X-Last X-First 1 MATCH
    X-Last X-First 2
    Y-Last Y-First 3
    Z-Last Z-First 1 MATCH
    X-Last X-First 1 MATCH
    X-Last X-First 2

  3. #3
    Registered User
    Join Date
    05-31-2007
    Posts
    9

    Thanks

    That seems to be working!

+ 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