+ Reply to Thread
Results 1 to 9 of 9

count number of times a text appeared in a month in given range of dates and names

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    count number of times a text appeared in a month in given range of dates and names

    Hi,
    In sheet1 I have date in column 'A' & 'H' and names in column 'B' & 'I'

    In sheet2 I have month ( Jan to Dec) in column 'A' and in columns B to J are the Names.
    I am trying to count in sheet2 how many times that the name has appeared in particular month in sheet1 in the columns given.

    If any one can help please
    sample file is attached

    Kind regards
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: count number of times a text appeared in a month in given range of dates and names

    I am trying the following

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: count number of times a text appeared in a month in given range of dates and names

    Try
    in sheet2
    B2 =SUMPRODUCT((MONTH(Sheet1!$A$2:$A$21) = VLOOKUP($A2,MonthList,2,0))*(Sheet1!$B$2:$B$21=B$1))
    Where MonthList stands for
    Jan 1
    Feb 2
    Mar 3
    Apr 4
    May 5
    Jun 6
    Jul 7
    Aug 8
    Sep 9
    Oct 10
    Nov 11
    Dec 12
    This is for the first area, do the same for the second one and do the sum
    I suggest to give a name to
    $A$2:$A$21
    and
    $B$2:$B$21
    Attached Files Attached Files
    Last edited by PCI; 01-26-2014 at 07:03 AM. Reason: Typo

  4. #4
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: count number of times a text appeared in a month in given range of dates and names

    Hi PCI,
    Thanks for your help. It looks good, however:
    Jan gives value of 2 for name 'Make' where as it is only once
    Feb 'Sake' appears once in the list but shows as zero.
    Any further help please
    Kind regards

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: count number of times a text appeared in a month in given range of dates and names

    Did you check the data in the file sent: I modified some values for debugging
    Make appears twice in Jan
    Fake appears for June only

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: count number of times a text appeared in a month in given range of dates and names

    Hi,
    Apology. Cant seem to understand.
    I have checked the modified sheet.
    Please have a look . I have attached it again.
    Thanks
    kind regards
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: count number of times a text appeared in a month in given range of dates and names

    Hi PCI,
    I have figured it out now.
    You were right.
    It is a great help from you.
    I have clicked * to express my gratitude.
    Really thanks
    Kind regards

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: count number of times a text appeared in a month in given range of dates and names

    As I explained the formula is only for the first bank of data.
    The complete formula is:
    B2 =SUMPRODUCT((MONTH(Sheet1!$A$2:$A$21) = VLOOKUP($A2,MonthList,2,0))*(Sheet1!$B$2:$B$21=B$1))+SUMPRODUCT((MONTH(Sheet1!$H$2:$H$21) = VLOOKUP($A2,MonthList,2,0))*(Sheet1!$I$2:$I$21=B$1))
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: count number of times a text appeared in a month in given range of dates and names

    "It is a great help from you.
    I have clicked * to express my gratitude.
    Really thanks
    Kind regards"

    You're welcome, thank you for the thanks back
    PCI

+ 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 number of times the month has appeared
    By Rianne in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2013, 10:35 PM
  2. Replies: 4
    Last Post: 02-24-2012, 08:12 AM
  3. Counting number of times a Text pattern appeared in a range
    By khalidawan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2008, 05:35 AM
  4. [SOLVED] Re: How to count the number of times something occurs within a certain month
    By Joyce in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-18-2005, 04:05 PM
  5. [SOLVED] How to count the number of times something occurs within a certain month
    By Joyce in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2005, 02:05 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