Count number of times rows in one column match rows in a second column between 2 dates.

DukeJCDC

New Member
Joined
Jun 19, 2014
Messages
8
I've been searching for this for a couple days now and have come across anything. I know it can be done in VBA, but I'd like to know if it can be done with a formula.

I've got 2 columns I need to count how many times they match between dates listed in a 3rd column.

Example:
On Sheet one there is....
Date Orders
1/1/14 1001
1/1/14 1002
1/3/14 1003
2/4/14 1004

On sheet two there is....
Job
1001
1001
1001
1002
1002
1003
1004
1004
1004
1004


And lets say I am wanting a formula that counts the amount of times the order number matches the job number for the month of February.
 
The problem is, my criteria would be 'Sheet1'!B:B='Sheet2'!A:A and just countif doesn't allow you to count comparing entire columns as criteria.
 
Upvote 0
E2: 1-Feb-14

F2:
Rich (BB code):
=SUMPRODUCT(
  --(Sheet1!$A$2:$A$100>=E2),
  --(Sheet1!$A$2:$A$100<=EOMONTH(E2,0)),
  --ISNUMBER(MATCH(Sheet1!$B$2:$B$100,Sheet2!$A$2:$A$100,0)))
 
Upvote 0
The problem is, my criteria would be 'Sheet1'!B:B='Sheet2'!A:A and just countif doesn't allow you to count comparing entire columns as criteria.


The spreadsheet I'm working with, Sheet1 has 25k rows of data and sheet2 has 46k rows. And they both get longer daily. I'm wanting an equation for the back end of everything instead of the front end.
 
Upvote 0
The spreadsheet I'm working with, Sheet1 has 25k rows of data and sheet2 has 46k rows. And they both get longer daily. I'm wanting an equation for the back end of everything instead of the front end.

Since you seem to reply to yourself, post #5 must be of no use to you.
 
Upvote 0
Since you seem to reply to yourself, post #5 must be of no use to you.


I've also been running circles at work and haven't had a chance to try what you posted till just now. Looks like what you have would work, but I'm on a laptop atm and it can't handle all those calculations. Thanks for your help though! I think I'll have to figure out a macro.
 
Upvote 0
I've also been running circles at work and haven't had a chance to try what you posted till just now. Looks like what you have would work, but I'm on a laptop atm and it can't handle all those calculations. Thanks for your help though! I think I'll have to figure out a macro.

How did you implement the suggestion? That's, how does the implemented formula look like?
 
Upvote 0
How did you implement the suggestion? That's, how does the implemented formula look like?


I'm not able to use a formula it's not looking like. Too much data to process, the calculation locks up excel. I'm going to be working on a macro this weekend that will hopefully be able to put together a collection and count it out that way.
 
Upvote 0

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