Countifs year and month of one cell match year and month of other cell and several other criteria

rfigueroa1976

New Member
Joined
Jan 10, 2019
Messages
14
Trying to get a count of orders that were shipped out of a city during a year and month listed in another cell...

Countifs city in column B:B is the same as f2, state in column C:C is the same as g2, Month in Column d:d is the same as the month in the date in f3, Year in Column d:d is the same as the month in the date in f3.

The formula i currently have is =COUNTIFS(B:B,F2,C:C, G2) but still need to add the month and year portion of the formula.

I'd attach a worksheet but I currently don't have permission to do so.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Not coming back with correct counts :( Also, can you please explain how the eomonth function is working. Does that take into consideration the year as well?
 
Upvote 0
The formula has been tested to work with a mock-up dataset.

The EOMONTH function works as follows:

If you have, say, 16-Jan-2019 in cell F3,
EOMONTH(F3,-1) returns 31-Dec-2018
EOMONTH(F3,-1)+1 returns 1-Jan-2019
EOMONTH(F3,0) returns 31-Jan-2019
EOMONTH(F3,0)+1 returns 1-Feb-2019

So, it does take into consideration the year as well.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top