Add date range using From & To cells

censura

New Member
Joined
May 15, 2007
Messages
24
Hi i did post this earlier but maybe the existing formula was not very clear so though i would try with a different example

So i have this formula

=COUNTIF(leads!$M$3:leads!$M$1439,"Failed Credit Check")

that counts instances in column M of a record sheet that has the date in column A

what i would like is to run the formula but be able to select a date range by adding a from and to date in say cell $N1$ & $O$1

so that rather than getting a count for all instances it only counts for the rows that have 'Failed Credit Check' in column M but in date range set in cells $N1$ & $O$1 for e.g 1/2/2021 - 28/2/21

Thank you so much for your help here
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You cant with COUNTIF. You can with COUNTIFS.

=COUNTIFS(leads!$M$3:$M$1439,"Failed Credit Check",leads!$A$3:$A$1439,">="&$N$1,leads!$A$3:$A$1439,"<"&$O$1+1)
 
Upvote 0
You cant with COUNTIF. You can with COUNTIFS.

=COUNTIFS(leads!$M$3:$M$1439,"Failed Credit Check",leads!$A$3:$A$1439,">="&$N$1,leads!$A$3:$A$1439,"<"&$O$1+1)
Works a treat thank you so much, is it possible to add the condition if cell $N$1 says All treats as all records
 
Upvote 0
You would just put in a catch all date range. Say 1/1/1900 to 31/12/2100 or something similar.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Add a date range search using From & To cells
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,608
Members
449,038
Latest member
apwr

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