# Countif - problem when using date as criteria

#### pigionweb

##### New Member
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
You're telling it to count cells that have the text "K6". Try it like this:

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

#### pigionweb

##### New Member
Wow, that was quick... lovely and solved Many thanks!

#### bbott

##### Well-known Member
Wow, that was quick... lovely and solved Many thanks!

You're welcome.

Replies
3
Views
1K
Replies
2
Views
395
Replies
1
Views
716
Replies
15
Views
489
Replies
8
Views
886

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.

### Which adblocker are you using?

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

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