Count if cell row number is divisible by 9 and if the cell also does not say student.

lars1565

New Member
Joined
Apr 18, 2016
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I want excel to check a column and countif the any cell in the column meets two criteria.

1) the cells row number needs to be divisible by 9, I think that would look something like MOD(ROW(A:A),9)=0

2) The cell also needs to not be blank or say student, something like AND(A:A<>"",A:A<>*Student*)

I feel (if it is actually possible) to something like:

=COUNTIFS(A:A,MOD(ROW(A:A),9)=0,AND(A:A<>"",A:A<>*Student*)

but not correct.

Any help is appreciated. Thanks
LL
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Almost there =SUMPRODUCT(MOD(ROW(A:A),9)=0,A:A<>"",A:A<>"Student")

Using entire columns slows things down. better use a limited range or a dynamic one
 
Upvote 0
Assuming your data, say, in A2:A100 try

=SUMPRODUCT(--(MOD(ROW(A2:A100),9)=0),--(A2:A100<>""),--(A2:A100<>"Student"))

Remark: for the sake of performance do not use references to entire columns (like A:A) in SUMPRODUCT.

M.
 
Upvote 0
Try to robustify though...

=SUMPRODUCT(--(MOD(ROW(A2:A100)-ROW(A2),9)=0),--(A2:A100<>""),--(A2:A100<>"Student"))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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