+ Reply to Thread
Results 1 to 4 of 4

Countifs with conditions based on same row in source

  1. #1
    Registered User
    Join Date
    02-11-2012
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    41

    Countifs with conditions based on same row in source

    I have a large data set where one requirement is to obtain the count of duplicate people using their first and last name provided in two discrete columns and perform a lookup in another sheet for a count of that sheets rows that have the same two values in two different rows.

    For example, in the attached document, A2:B13 represents the lookup data I want to check for appearances of rows in E2:F10.
    A matching row must have both the first and last name equal, then I want the count in column next to E2:F10.

    I know I could create a computed column in each concatenating the first and last name of each sheet to simplify this, but in this case it would more efficient to create a single formula and auto fill it throughout a column.

    Is this possible?
    Attached Files Attached Files
    Last edited by ritmo2k; 08-07-2019 at 10:17 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Countifs with conditions based on same row in source

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.
    It's not obvious to me what result you actually want.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-11-2012
    Location
    London, England
    MS-Off Ver
    2021
    Posts
    41

    Re: Countifs with conditions based on same row in source

    Hi Richard,
    Thanks for the suggestion, I have uploaded a sample document and updated the post.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,578

    Re: Countifs with conditions based on same row in source

    Try pasting the following into cell H2 and copying down: =SUMPRODUCT(--(A$2:A$13&B$2:B$13=E2&F2))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  2. Countifs - Counting based on conditions
    By Excel-Erick in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-15-2016, 11:26 AM
  3. COUNTIFS multiple conditions
    By akkerstad in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-04-2014, 03:38 PM
  4. [SOLVED] COUNTIFS with two string conditions
    By loloduane in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2014, 05:50 AM
  5. [SOLVED] CountIfs With Multiple Conditions
    By NotQuiteThere in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-18-2012, 09:35 PM
  6. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  7. Countifs for multiple conditions
    By batjl9 in forum Excel General
    Replies: 4
    Last Post: 03-25-2011, 09:07 PM

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