Countif - problem when using date as criteria

pigionweb

New Member
Joined
Sep 4, 2014
Messages
2
Hello everyone,

here is what I need to do: I got a list of dates and need to count those above let's say 23-apr-14. Pretty simple, so I write:

=COUNTIF(M10:M37,">=23-apr-14")

this works just fine, correctly returns 6, all nice.

Now I will need to change the treshold date from time to time and will have the formula in many cells, so I put the treshold date 23-apr-14 in a cell, let's say K6, and change the formula to this:

=COUNTIF(M10:M37,">=K6")

Here the trouble start's, the reults shows 0, no matter what I tried to do.

Do you have any ideas, why could the formula work when date entered directly, but not when referenced from other cell?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

bbott

Well-known Member
Joined
Feb 5, 2010
Messages
2,350
You're telling it to count cells that have the text "K6". Try it like this:

=COUNTIF(M10:M37,">="&K6)
 
Upvote 0

Forum statistics

Threads
1,191,125
Messages
5,984,786
Members
439,911
Latest member
dk73

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
Top