+ Reply to Thread
Results 1 to 7 of 7

2 Different counting functions on same sheet

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    13

    2 Different counting functions on same sheet

    I am working on a project where I need to easily calculate "visits" to companies in large quantities. I have attached to this Thread a sample of what I am working on. Currently I am able to put a number in the collumn labeled "Visit" and regardless what the number is, the appropriate numbers will calculate in cell B2 and B3. What I need to do is create a second function of some sort that will count the total number of vendors over $1,000 and the percentage that have been visited. I have set up a section for this in column C but I can't find a way to do the counting. This is only a sample that I have attached, the real form has thousands of entries.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: 2 Different counting functions on same sheet

    Maybe

    in C2
    =SUMPRODUCT((B6:B14 > 1000)*(D6:D14 <> 0))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: 2 Different counting functions on same sheet

    maybe with an pivot table?

    see the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: 2 Different counting functions on same sheet

    Hi,

    Here is what I was able to come up with.

    1. In cell B1 it will now add up the total amount of vendors.
    2. Columns J,K, and L will count 1 everytime the criteria of a vendor worth more than 1000.00 is true and if they have been visited or contacted by phone.
    3. Cells B2, B3, and B4 will get their data based on the valuse in Columns J, K, and L.

    You can hide the calculations in J, K, and L by changing the font color to white if you wish.

    I hope this helps and let me know if you need anything else!


    Simeon

  5. #5
    Registered User
    Join Date
    08-14-2009
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: 2 Different counting functions on same sheet

    Quote Originally Posted by simeon.hruby View Post
    Hi,

    Here is what I was able to come up with.

    1. In cell B1 it will now add up the total amount of vendors.
    2. Columns J,K, and L will count 1 everytime the criteria of a vendor worth more than 1000.00 is true and if they have been visited or contacted by phone.
    3. Cells B2, B3, and B4 will get their data based on the valuse in Columns J, K, and L.

    You can hide the calculations in J, K, and L by changing the font color to white if you wish.

    I hope this helps and let me know if you need anything else!


    Simeon
    Thank you all for your help. I found this sheet to be the most helpful given my limited experience with excel.

    Can you now show me how to calculate a total number "Y" visits in column D and E for the whole? I need to be able to have calculations for both visits and percentages for vendors worth over 1000 and also visits and percentages for total visits as a whole not based on dollar amounts.

    Thank you,

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: 2 Different counting functions on same sheet

    Maybe

    =COUNTIF(D6:D1000,"y")

    =COUNTIFs(D6:D1000,"y",e6:e1000,"y")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: 2 Different counting functions on same sheet

    Davpmars,

    Sure that's no problem!
    Going off of the spreadsheet that I posted for you all you have to do is use some COUNTIF functions like Fotis1991 said.

    In cell C2 I used
    Please Login or Register  to view this content.
    the $ in front of the column letter and row number is used to make that cell or range absolute. In this case any "Y" in column D will becounted once and all of them will be added toghether.

    In cell C3 I used
    Please Login or Register  to view this content.
    This is taking the number of vendors that were visited as calculated in the above formula and dividing it with the total number of vendors in cell B1, thus giving you a percentage of visited vendors.

    In cell C4 I used
    Please Login or Register  to view this content.
    This works the same as the first formula but I am using Column E to count all of the cells that equal "Y" and then dividing that number with the total number of vendors to give you a percentage of vendors that were contacted by phone.

    I have attached a spreadsheet with the updates on it. I hope this helps!


    Simeon

+ 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