+ Reply to Thread
Results 1 to 9 of 9

counting names in column and matches phone numbers

  1. #1
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    counting names in column and matches phone numbers

    hi i need help with the following
    in column D I need to know how many smiths there are and if the phone number matches the same surname
    if the phone number doesn't match its is differance smith and so on down column D
    i have included a file
    Attached Files Attached Files
    Last edited by Duckie; 12-09-2009 at 08:03 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: counting names in column and matches phone numbers

    Here, try this: =SUMPRODUCT(--($B$4:$B$19=B4),--($C$4:$C$19=C4))

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: counting names in column and matches phone numbers

    Or this for empty cells between:

    =IF(COUNTIF($C$4:C4,C4)>1,"",SUMPRODUCT(--($B$4:$B$19=B4),--($C$4:$C$19=C4)))

  4. #4
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: counting names in column and matches phone numbers

    hi

    its telling me that i have 2 smiths in D4 and D5 i only need to tell me once not twice

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Post Re: counting names in column and matches phone numbers

    zbor's revised version should account for your prior post.

    If you're using XL2007 you should (IMO) really use COUNTIFS in this instance

    Please Login or Register  to view this content.
    change ranges to suit requirements

  6. #6
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: counting names in column and matches phone numbers

    thank you zbor the second on worked

  7. #7
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: counting names in column and matches phone numbers

    =if(match($b4,b$4:$b4,0)>=row($a1),countifs(b$4:b$19,$b4,c$4:c$19,$c4),"")
    Last edited by contaminated; 12-09-2009 at 08:21 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: counting names in column and matches phone numbers

    Quote Originally Posted by CWE
    Your formulae works only when th range sorted in acsending or descending order.
    True to an extent - the sort order is irrelevant - what is important is that the data is "grouped" together based on combinations.

    And yes this was the assumption made in my formula - given this was the implied setup in the original.

    Thanks for taking the time to review & adapt though of course you need to search for the combination of B & C not just B.

    Worth adding perhaps that the exact MATCH test (0) to handle unsorted data would be slower so if not needed don't use it.

  9. #9
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: counting names in column and matches phone numbers

    True also...

+ 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