I can manually type a date into this formula and get my desired result but if I reference a data validation list the formula does not work.

bjiii2231

New Member
Joined
Jul 25, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am looking to to sort data between two dates. I can manually type the dates into the formula but if I reference a drop down cell the formula does not work.

This formula works:
=COUNTIFS('PLANNER 25'!$A$2:$A$176, ">=3/1/2024",'PLANNER 25'!$A$2:$A$176, "<=7/24/2024",'PLANNER 25'!$C$2:$C$176,'Repair %'!A23)

This formula does not work:
=COUNTIFS('PLANNER 25'!$A$2:$A$176, ">=C21",'PLANNER 25'!$A$2:$A$176, "<=E21",'PLANNER 25'!$C$2:$C$176,'Repair %'!A23)

I have tried various version with and without "" or >= symbols... if it references another cell the formula does not work.

Thanks for any help
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the Board!

Try this:
Excel Formula:
=COUNTIFS('PLANNER 25'!$A$2:$A$176, ">=" & C21,'PLANNER 25'!$A$2:$A$176, "<=" & E21,'PLANNER 25'!$C$2:$C$176,'Repair %'!A23)
 
Upvote 0
Solution
Welcome to the Board!

Try this:
Excel Formula:
=COUNTIFS('PLANNER 25'!$A$2:$A$176, ">=" & C21,'PLANNER 25'!$A$2:$A$176, "<=" & E21,'PLANNER 25'!$C$2:$C$176,'Repair %'!A23)

This did it thank you for your support!!!
 
Upvote 0
You are welcome!

The important thing to remember is that only literal text goes between double-quotes (as that is the text qualifier).
All variables, ranges, etc must be OUTSIDE of the double-quotes.
And then then just sew them all together with &.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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