+ Reply to Thread
Results 1 to 12 of 12

Count number of name by condition of other column

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    dubai UAE
    MS-Off Ver
    Excel 2010
    Posts
    8

    Count number of name by condition of other column

    Dear all,

    This is my first post as I have a big problem in my excel sheet.
    I have a sheet that goes on to 1000 rows and let say column A contains 10 to 15 different people names and column B contain different dates, not in order.
    Is there a way that could show how many times does a specific name occur in one specific date?

    Thank you all!!! Appreciate your help in advance!!

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Count number of name by condition of other column

    The easiest way to obtain real summarry of names and dates with counting is Pivot Table.
    Try this tool, once you start using it, your excel productivity will leap 2 levels up
    If you want to do it more "manually" (Just for 1 name and specific date or dates range) use COUNTIFS function
    Last edited by Kaper; 02-11-2014 at 03:02 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Count number of name by condition of other column

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

  4. #4
    Registered User
    Join Date
    02-11-2014
    Location
    dubai UAE
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Count number of name by condition of other column

    Dear Kaper,

    Thanks a lot for the suggestion, I haven't use pivot table before so I will give it a try later on. I actually did some research before posting here and I found a lot suggesting pivot table as well. I think I will have to learn it any how :P

  5. #5
    Registered User
    Join Date
    01-23-2014
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Count number of name by condition of other column

    Yes you can use Countifs function and give conditions in that Eg
    By using
    =COUNTIFS($A:$A,"Name",$B:$B,"Date")
    Give name and date according to your requirement.
    Last edited by tanvi_kalra; 02-11-2014 at 03:15 AM.

  6. #6
    Registered User
    Join Date
    02-11-2014
    Location
    dubai UAE
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Count number of name by condition of other column

    Thanks tanvi_kalra for your suggestions. I did use countif and countifs before and only this time is gave me #VALUE! instead
    I used =COUNTIFS(A2:A100,"Peter",B2:B100,"2/2/2014"), I even tired "*xxxxx*" and still no luck.....

  7. #7
    Registered User
    Join Date
    01-23-2014
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Count number of name by condition of other column

    Check once Is the Name and date format is correct??
    its better if you can share some sample sheet so that i can identify the error easily.

    Thanks ,
    Tanvi

  8. #8
    Registered User
    Join Date
    02-09-2014
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Count number of name by condition of other column

    I think its best you share a sample worksheet like Tanvi rightly said because this code:

    =COUNTIFS(A2:A100,"Peter",B2:B100,"2/2/2014") Should work easy provided the column contains your search items.

    try; =COUNTIFS($A:$A,"Peter",$B:$B,"2/2/2014")

  9. #9
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Count number of name by condition of other column

    welcome to the forum. try not to use dates like 2/2/2014 with the months in numbers. it is both confusing & applicable to only a set of regional settings. i don't know if that is DMY or MDY. so if your region settings is MDY with this data:
    Data Range
    A
    B
    1
    Peter
    1-Feb-14
    2
    Bob
    1-Feb-14
    3
    Peter
    2-Jan-14
    4
    Peter
    2-Jan-14

    and you use:
    =COUNTIFS($A:$A,"Peter",$B:$B,"2/1/2014")

    because your region settings is MDY, it will return 1 count. mine in DMY will return 2 counts. so use this instead:
    =COUNTIFS($A:$A,"Peter",$B:$B,"1Feb2014")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Count number of name by condition of other column

    Or, to be independant on local setings:
    =COUNTIFS($A:$A,"Peter",$B:$B,DATE(2014,2,2))
    arguments in inner function DATE are in Y, M, D sequence
    The only requirement is that in column B there are real excel dates (not texts, which only look similar to dates).

  11. #11
    Registered User
    Join Date
    02-11-2014
    Location
    dubai UAE
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Count number of name by condition of other column

    Guys, thank you so much. I had this problem for months and I can't believe you guys just solved my problem within hours!!!!!
    I used: =COUNTIFS($L:$L,"Peter",$U:$U,"1/1/2014") **Eventho in cell it shows 1-Jan-2014**
    You guys are AMAZING!!!

    btw Kaper, quick question, I was watching video to learn pivot table as I said before and would that be able to insert the pivot table in the same sheet as the data? every time i pull out the pivot table it brings out a new sheet. and also would the data in pivot table change if I change the primary date in the original column?

    sorry for all these stupid questions I asked these two days :P

    However, once again a big thank you to you guys!!!!

  12. #12
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Count number of name by condition of other column

    Sure, you can place pivot table in the same sheet your data is.
    During Insert->Pivot Table you see dialog window similar to one on picture attached (but in English, while my Excel "speaks" Polish) - just choose option button "place Pivot Table in the current Sheet" and show where to place it (outside raw data).

    Refreshing - basically you have to refresh Pivot Table manually.
    (Can be perceived positive, because with large datasets formulas tend to take tiiiiime to calculate).
    Attached Images Attached Images

+ 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: 4
    Last Post: 07-16-2013, 09:45 AM
  2. [SOLVED] Formula to count number of blank cells for a specific condition in another column
    By Daniel_12 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-30-2013, 07:16 AM
  3. [SOLVED] Count the number of times multiple condition are met
    By wishkey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2013, 07:02 PM
  4. [SOLVED] Count repeat numbers in column B based on a condition from Column Al
    By helpbitte in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-24-2012, 10:11 AM
  5. Replies: 5
    Last Post: 08-05-2009, 02:43 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