+ Reply to Thread
Results 1 to 7 of 7

XL 2010 - Identify how many records contain BOTH values

  1. #1
    Registered User
    Join Date
    03-20-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    10

    Question XL 2010 - Identify how many records contain BOTH values

    Hello,

    I have a list of customers and details of which product they had purchased (out of two). Some may have bought two of the same or two different products, or any other combination.
    However, I need to identify how many customers have purchased BOTH products.

    Attached is an example table. I would need to know how many have purchased both product ABC and product DEF.

    Hope that's clear enough for you guys to help.
    Attached Files Attached Files

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: XL 2010 - Identify how many records contain BOTH values

    Try this in C2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    03-20-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    10

    Re: XL 2010 - Identify how many records contain BOTH values

    ignore - message deleted
    Last edited by RichardLynch; 09-11-2019 at 07:48 AM. Reason: actual response below

  4. #4
    Registered User
    Join Date
    03-20-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    10

    Re: XL 2010 - Identify how many records contain BOTH values

    Quote Originally Posted by PaulM100 View Post
    Try this in C2 and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you for this however this doesnt work in the way I intended.
    Using your formula in my example, it shows as customer 1000001 as having 3 products, however they actually own 2 different types so this should show as 2. I dont need to know if they hold multiple of the same, but only interested in who owns more than one type of product which in this case is ABC and DEF

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: XL 2010 - Identify how many records contain BOTH values

    How about, in C2 copied down
    =IF(A2=A1,"",SUM(COUNTIFS(A:A,A2,B:B,"ABC")>0,COUNTIFS(A:A,A2,B:B,"DEF")>0))

  6. #6
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: XL 2010 - Identify how many records contain BOTH values

    Well, we are not mind readers and if you don't explain properly we will asume what you want. And the formula can be tweeked to make what you want possible as per Fluff's example

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: XL 2010 - Identify how many records contain BOTH values

    I am not so clear either. Here are two interpretations I arrived at.

    In C2 and filled down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in C1
    Formula: copy to clipboard
    Please Login or Register  to view this content.




    A
    B
    C
    1
    Customer Number
    Product Purchased
    3
    2
    1000001
    ABC
    1000001
    3
    1000001
    ABC
    4
    1000001
    DEF
    5
    1000002
    ABC
    6
    1000003
    ABC
    7
    1000004
    ABC
    8
    1000005
    ABC
    9
    1000006
    ABC
    1000006
    10
    1000006
    DEF
    11
    1000007
    ABC
    12
    1000007
    ABC
    13
    1000008
    ABC
    14
    1000009
    ABC
    15
    1000010
    ABC
    1000010
    16
    1000010
    DEF
    17
    1000011
    ABC
    18
    1000012
    ABC
    19
    1000013
    ABC
    20
    1000014
    ABC
    21
    1000015
    ABC


    Another way is to build a table:
    Copy - paste all Customer Numbers in G > apply remove duplicates.
    Put the Product "names" ABC, DEF in H1:I1.
    Then this formula in H2 filled down and across column I
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then for the counts in J2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    G
    H
    I
    J
    1
    ABC
    DEF
    Counts
    2
    1000001
    2
    1
    2
    3
    1000002
    1
    0
    1
    4
    1000003
    1
    0
    1
    5
    1000004
    1
    0
    1
    6
    1000005
    1
    0
    1
    7
    1000006
    1
    1
    2
    8
    1000007
    2
    0
    1
    9
    1000008
    1
    0
    1
    10
    1000009
    1
    0
    1
    11
    1000010
    1
    1
    2
    12
    1000011
    1
    0
    1
    13
    1000012
    1
    0
    1
    14
    1000013
    1
    0
    1
    15
    1000014
    1
    0
    1
    16
    1000015
    1
    0
    1
    Dave

+ 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. Replies: 8
    Last Post: 09-25-2014, 10:14 AM
  2. [SOLVED] How can I identify if a record has two different records?
    By jgomez in forum Access Tables & Databases
    Replies: 5
    Last Post: 01-27-2014, 02:43 PM
  3. Can Access help identify changes in records?
    By jgomez in forum Access Tables & Databases
    Replies: 1
    Last Post: 08-26-2013, 10:37 AM
  4. Identify any duplicate records in excel
    By hanisaeed in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-08-2012, 12:21 AM
  5. [SOLVED] identify cell values in excel 2010
    By sapen in forum Excel General
    Replies: 15
    Last Post: 04-04-2012, 11:03 PM
  6. Replies: 3
    Last Post: 03-21-2012, 05:11 PM
  7. Identify, not eliminate, duplicate records
    By BinkyGidget in forum Excel General
    Replies: 7
    Last Post: 05-02-2007, 07:00 AM

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