# How can I make this work - sorry for the vague title!

#### Fazila

##### Board Regular
=SUMPRODUCT(SUBTOTAL(3,OFFSET(Cohort!\$L\$13:\$L\$2002,ROW(Cohort!\$L\$13:\$L\$2002)-MIN(ROW(Cohort!\$L\$13:\$L\$2002)),,1))*(Cohort!\$L\$13:\$L\$2002>5<21))

It works for =SUMPRODUCT(SUBTOTAL(3,OFFSET(Cohort!\$L\$13:\$L\$2002,ROW(Cohort!\$L\$13:\$L\$2002)-MIN(ROW(Cohort!\$L\$13:\$L\$2002)),,1))*(Cohort!\$L\$13:\$L\$2002<=5))

However, for the next row I need values that are greater than 5 but less than equal to 20.

Thanks

Fazila

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try...

=SUMPRODUCT(SUBTOTAL(3,OFFSET(Cohort!\$L\$13:\$L\$2002,ROW(Cohort!\$L\$13:\$L\$2002)-MIN(ROW(Cohort!\$L\$13:\$L\$2002)),,1))*(Cohort!\$L\$13:\$L\$2002>5)*(Cohort!\$L\$13:\$L\$2002<21))

By the way, a suitable title might have been "Count based on multiple criteria and filtered list".

Hope this helps!

Last edited:
Thanks Domenic I managed to make the formula work using

=SUMPRODUCT(--(Cohort!\$L\$13:\$L\$2002>5),--(Cohort!\$L\$13:\$L\$2002<=20),SUBTOTAL(3,OFFSET(Cohort!\$L\$13:\$L\$2002,ROW(Cohort!\$L\$13:\$L\$2002)-MIN(ROW(Cohort!\$L\$13:\$L\$2002)),,1)))

Thanks for posting

Yep, that would do it too...

Cheers!

Last edited:

Replies
0
Views
160
Replies
2
Views
94
Replies
2
Views
177
Replies
3
Views
247
Replies
12
Views
328

1,203,388
Messages
6,055,129
Members
444,763
Latest member
Jaapaap

### 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