+ Reply to Thread
Results 1 to 12 of 12

Count Formula??

  1. #1
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Count Formula??

    I am trying to write a formula to count the number of customers that are in a given year and for a specific collector. The account numbers are in column "A", the Date is in column "B", and the collector id is in column "C". I need a count of customer numbers for collector 1 that are in years 2015 and 2016. Any ideas?

    Customer # Date Collector
    1234 2015 1
    5678 2016 1
    9234 2015 4
    7165 2017 7

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Count Formula??

    Pivot Table.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Re: Count Formula??

    Quote Originally Posted by TMS View Post
    Pivot Table.
    I can't just use a pivot. I need to automatically update another report with these figures every time the report gets downloaded into the spreadsheet. I really need a formula to calculate it.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Count Formula??

    Please see the yellow banner at the top of the page. Show your expected results.

  5. #5
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Re: Count Formula??

    Quote Originally Posted by lp14301 View Post
    I am trying to write a formula to count the number of customers that are in a given year and for a specific collector. The account numbers are in column "A", the Date is in column "B", and the collector id is in column "C". I need a count of customer numbers for collector 1 that are in years 2015 and 2016. Any ideas?

    Customer # Date Collector
    1234 2015 1
    5678 2016 1
    9234 2015 4
    7165 2017 7
    Expected results would be 2 customers 1234 and 5678 are both collector 1 and in years 2015 and 2016.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Count Formula??

    Then:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Re: Count Formula??

    Quote Originally Posted by TMS View Post
    Then:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ok i didn't give enough example data. That formula only pulls back the number of lines where the year and collector meet the requirement. There may be multiple lines with the same customer number so I need the formula to only count the customer number once if it is in there multiple times for those years. Any thoughts?

  8. #8
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Re: Count Formula??

    Quote Originally Posted by lp14301 View Post
    Ok i didn't give enough example data. That formula only pulls back the number of lines where the year and collector meet the requirement. There may be multiple lines with the same customer number so I need the formula to only count the customer number once if it is in there multiple times for those years. Any thoughts?
    For example. there are three instances that would fall into the formula above for collector 1 in years 2015 and 2016, however there are two instances where account 1234 would be counted and I only need it to count one time. No duplicate account numbers. The formula result should still be 2 not 3.

    Customer # Date Collector ID
    1234 2015 1
    5678 2016 1
    9234 2015 4
    7165 2017 7
    1234 2015 6
    1234 2016 1

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Count Formula??

    Ok i didn't give enough example data.
    OK, last chance ...
    Please see the yellow banner at the top of the page. Show your expected results.

  10. #10
    Registered User
    Join Date
    10-03-2021
    Location
    Texas
    MS-Off Ver
    16
    Posts
    6

    Re: Count Formula??

    Quote Originally Posted by TMS View Post
    OK, last chance ...
    I did. the formula result should be 2 not 3. See the last line in my previous post. I am new to this forum and excel. What do you need from me? I need help.

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Count Formula??

    Read the yellow banner at the top of the screen - it tells you how you can attach a sample Excel workbook to one of your posts. If you do this then we can see exactly how your data is laid out, i.e. which columns you use for your data and where you want to see the results. In your sample file you should show the expected results (manually) and explain clearly how you have arrived at them.

    Also, you should edit your profile (using User CP) to show the version of Excel that you are using, as the solutions proposed may be dependent on this. "16" means nothing to me.

    Hope this helps.

    Pete

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Count Formula??

    I'm guessing you have some data in a worksheet, in a workbook? I want that, or something very similar to it, that preserves your customers's and collectors' privacy ... in an .xlsx workbook. Sufficient examples of what your data looks like, in the right columns. And I want to see the answer(s) you expect in the cell(s) where you want the result(s).

    That way, I don't have to copy your data into a blank spreadsheet and use Text to Columns to separate it out (like I did the first time) so that I can prepare and test a solution.

    Yellow Banner at the top of the screen
    HOW TO ATTACH YOUR SAMPLE WORKBOOK:
    lp14301 Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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] Formula to count consecutive non-zero values and reset count after a non-zero value
    By jchriste11 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2021, 12:08 PM
  2. Count Blank and count based on criteria only Formula Allowed
    By Harmender in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-21-2019, 12:26 PM
  3. Formula Required to Count Rows only if condition is meet or else dont count
    By Shahbazk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-22-2017, 08:39 AM
  4. (Count Formula) Count if two seperate ranges create unique combination
    By Geekcrux in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2016, 07:00 AM
  5. [SOLVED] Count formula not count hidden cells in table
    By tlacloche in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2013, 02:35 PM
  6. [SOLVED] Count and average formula needed to not count text field
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2013, 05:30 PM
  7. Replies: 5
    Last Post: 08-29-2012, 05:25 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