COUNTIF with cell reference in a conditional criteria

chrgrose

Board Regular
Joined
Sep 11, 2009
Messages
80
I am trying to count the number of values in a table which satisfy a greater than/less than condition which looks like this:

=COUNTIF($C$418:$L$2801,"<-2000")-COUNTIF($C$418:$L$2801,"<-2025")

My problem is that the values 2000 and 2025 are part of a column which increases by this increment a few hundred times. So what I would WANT to work is something like:

=COUNTIF($C$418:$L$2801,"<-$B1")-COUNTIF($C$418:$L$2801,"<-$B2")

so that I could just drag this cell down and the relative row reference would be understood.

Is there a trick that could be done to write this?
 

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
Try

=COUNTIF($C$418:$L$2801,"<"&-$B1)-COUNTIF($C$418:$L$2801,"<"&-$B2)
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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