+ Reply to Thread
Results 1 to 12 of 12

count item names based on the month

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    count item names based on the month

    hi,

    column A has dates and column B has item names (item1,item2,item3,item4,item5)

    how do you use a formula to count the no. of each item name for each month?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: count item names based on the month

    You would need to use COUNTIFS with the item, start date and end date as criteria.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: count item names based on the month

    hi, thanks for the reply

    i can get the no. of items in column B using countif but i dont know how to get the no. of each item based on a certain month in column A

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: count item names based on the month

    This is easy enough to do.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)?

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: count item names based on the month

    The answer we give is only as good as the question that you ask.

    We don't know how your dates are formatted, or where to look for the month to compare because you have not given us that information.

    =COUNTIFS(B:B,Item,A:A,">="&startdate,A:A,"<="&enddate)

    Where Item refers to the item to count, startdate refers to the first day of the month to count and enddate the last day of that month.

  6. #6
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: count item names based on the month

    hi,

    attached sample file
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: count item names based on the month

    Use a pivot table instead. The months that you have entered into D2:O2 are text, so they are not formula friendly. For formulas you need proper dates, it can be done without but it make things more complicated than they need to be.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: count item names based on the month

    hi,

    thanks for the reply i can replace the month column with actual dates in D2:O2 and i'll just format it with "MMM"
    how would the formula be then?
    Last edited by k1dr0ck; 08-16-2019 at 07:56 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: count item names based on the month

    One way - in D3 copied across and down:

    =SUMPRODUCT(($A$10:$A$30=DATE(2019,MONTH(DATEVALUE(D$2&" 1")),1))*($B$10:$B$30=$A3))

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: count item names based on the month

    That should work without DATE and MONTH, Ali, assuming that data is for the current year.

  11. #11
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: count item names based on the month

    D3=SUMPRODUCT((MONTH($A$10:$A$100)=MONTH(D$2&0))*($B$10:$B$100=$A3)*($A$10:$A$100<>"")) copy down and across

    Months are text like your file

  12. #12
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: count item names based on the month

    hi,

    thanks for the replies
    i used CARACALLA's formula

+ 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] month wise count item and price fluctuation between buying date
    By majidsiddique in forum Excel General
    Replies: 23
    Last Post: 02-19-2019, 01:35 AM
  2. Count item based off month when it changes
    By jamesraywebber in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2018, 10:55 AM
  3. [SOLVED] Filtering data based on few criteria such as month, style, item etc
    By Anuru in forum Excel Formulas & Functions
    Replies: 117
    Last Post: 06-11-2017, 01:36 PM
  4. Concatenate names based on month in different cell
    By enwoznick in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-28-2016, 03:32 PM
  5. [SOLVED] count number of times a text appeared in a month in given range of dates and names
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-26-2014, 08:27 AM
  6. macro to compare item based on month
    By koi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2012, 09:55 AM
  7. [SOLVED] Help with a system to auto populate month names based on current month
    By rosboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 05:17 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