Countifs & Date in Another Field

isadoko

Active Member
Joined
Jan 10, 2005
Messages
322
Office Version
  1. 365
Platform
  1. Windows
I have a column of dates with time. I have converted the date and time to date only using =INT(A2); the result is in column B. in C1 I created a drop-down with the months all based on the first day of the month, ie, 1/1/2016, 2/1/2016, 3/1/2016, etc. I want to use the drop down to trigger the =COUNTIFS like this:

=COUNTIFS(owssvr!B2:B942,C1,owssvr!S2:S942,"pass")... also tried =COUNTIFS(owssvr!B2:B942,"="&C1,owssvr!S2:S942,"pass") unsuccessfully.

So far does not want to acknowledge the date in cell C1 so have had to write like this:

=COUNTIFS(owssvr!B2:B942,">=4/1/2016",owssvr!B2:B942,"<=5/1/2016",owssvr!S2:S942,"pass")

Obviously doing something wrong but cannot put finger on it. Would appreciate any help to find my way. Thanks.
 
Tried your edit and works nicely. As for the blanks now working. Finally, I would like drag down and across if possible so need columnar reference to move from left to right from column S, start of data set of interest to column BG the last column of dataset of interest. I have read about HLOOKUP and SUM(INDEX(MATCH and OFFSET(MATCH but as yet not been able to realize a workable solution.
The following formula will allow dragging across and down; see if it works for you:

=COUNTIFS(owssvr!$A:$A,">="&$C$1,owssvr!$A:$A,"<"&EOMONTH($C$1,0)+1,owssvr!S:S,"pass")
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Tried your edit and works nicely. As for the blanks now working. Finally, I would like drag down and across if possible so need columnar reference to move from left to right from column S, start of data set of interest to column BG the last column of dataset of interest. I have read about HLOOKUP and SUM(INDEX(MATCH and OFFSET(MATCH but as yet not been able to realize a workable solution.

Are you intending something like this which can be copied to the right and down?

=COUNTIFS(owssvr!$A:$A,">="&$C$1,owssvr!$A:$A,"<"&EOMONTH($C$1,0)+1,INDEX(owssvr!$S:$XFD,0,COLUMNS($S:S)),"pass")
 
Upvote 0
I see how you incorporated the INDEX and COLUMNS... What does XFD do?
 
Upvote 0
This has been most helpful and now to apply it--thank you and best wishes 2017.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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