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?
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?
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.
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
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
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.
hi,
attached sample file
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.
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.
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))
That should work without DATE and MONTH, Ali, assuming that data is for the current year.
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
hi,
thanks for the replies
i used CARACALLA's formula
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks