Counting Problem

Excel Ron

Board Regular
Joined
Apr 19, 2011
Messages
52
I am trying to figure out how to count the number of cells from one sheet to another. I was thinking a countif may work but I have two variables. I need to count the number of cells under two conditions, first variable is the name must match, the next is I only need to pull from this count if it falls between two dates (ex. 02/28/2011-02/28/2011. Any suggestions would be great.

Thanks,

Excel Ron
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
If you have Excel 2007 or later you could use COUNTIFS, e.g. if your dates are in column A and names in B then a formula like this

=COUNTIFS(A:A,">="&D2,A:A,"<="&E2,B:B,F2)

where D2 is start date, E2 end date and F2 contains a specific name
 
Upvote 0
Ok, what if I do not have the exact date in the the series (ex. I am looking for a date between 2/01/2011-02/28/2011 and most all of my dates are scattered during that month? I tried the formula with using the dates instead of the cell reference and it did not work. Any other suggestions? It is 2007 also.

Thanks,

Ron
 
Upvote 0
The formula should work "as is" if you have the earlier date in D2, i.e. 2/01/2011, and the later date in E2 - 02/28/2011....or if you want the date in the formula

=COUNTIFS(A:A,">="&DATE(2011,2,1),A:A,"<="&DATE(2011,2,28),B:B,F2)
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,735
Members
452,939
Latest member
WCrawford

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