+ Reply to Thread
Results 1 to 3 of 3

Count num of times data appears in one column, depending upon criteria in another column

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    Iowa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Count num of times data appears in one column, depending upon criteria in another column

    I need 2 completely separate counts using the same data.

    Count Number 1:
    I need to count the occurrences of USP code *102F1 or 102F1 OR 102B OR 102B1 OR 102B3 that have the same CUST NUM and also have USP CODE *100 or 100 or 101 or 101A or 101E.
    For example USP CODE *102F1 associated with CUST NUM 6 would not meet the criteria because although it does have USP CODE *102F1, it does not have any USP CODE *100 or 100 or 101 or 101A or 101E.

    USP CODE 102F1 associated with CUST NUM 7 does meet the criteria as it contains USP CODE 102F1 and USP CODE 100. So it would count as 1.

    USP CODE 102B and *102F1 associated with CUST NUM 11 does meet the criteria as it contains both USP CODES 102b and *102F1 as well as USP CODE 101. So they would count as 2.

    Then as a completely separate count from those above I need Count Number 2:

    I need to count the occurrences of USP code *102F1 or 102F1 OR 102B OR 102B1 OR 102B3 that have the same CUST NUM but DO NOT contain USP CODE *100 or 100 or 101 or 101A or 101E.
    For example, those associated with Customer Numbers 6, 7 or 11 do not meet the criteria as they all contain USP CODEs *100 or 100 or 101 or 101A or 101E.
    USP CODE 102F1 associated with CUST NUM 13 does meet the criteria as it does not contain any USP CODE *100 or 100 or 101 or 101A or 101E. It would count as 1.
    Attached Files Attached Files
    Last edited by lsmidt; 09-04-2013 at 07:57 PM. Reason: Add additional Test Data File

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Count num of times data appears in one column, depending upon criteria in another colu

    Can you please show the expected output also?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    09-03-2013
    Location
    Iowa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Count num of times data appears in one column, depending upon criteria in another colu

    Thank you for responding to my post Sixthsense! I have added another spreadsheet named TEST DATA-1 which shows how I would like to see the output. I hope this helps. Thanks!!

+ 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] count the number of times each string appears in a column and make a summary column
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-04-2012, 08:02 AM
  2. Replies: 3
    Last Post: 01-11-2012, 06:46 PM
  3. How do I count how many times a code appears in a column?
    By Leo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-05-2005, 11:05 PM
  4. [SOLVED] How do I count how many times a code appears in a column?
    By Leo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-03-2005, 09:05 AM
  5. Replies: 5
    Last Post: 04-16-2005, 11:07 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