Countif Hidden rows with criteria

Puffin617

New Member
Joined
Nov 13, 2008
Messages
27
Hi,

Currently My COUNTIF statement counts all the cell values which contain values above and below 2 calculated values (+- 2*SQRT(2/n)

=COUNTIF($R$2:$R$79,"<"&-2*SQRT(2/COUNT($R$2:$R$79)))+COUNTIF($R$2:$R$79,">"&2*SQRT(2/COUNT($R$2:$R$79)))

How do I add a second counter that ignores the ones that are in hidden rows?

Thanx
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi,

Currently My COUNTIF statement counts all the cell values which contain values above and below 2 calculated values (+- 2*SQRT(2/n)

=COUNTIF($R$2:$R$79,"<"&-2*SQRT(2/COUNT($R$2:$R$79)))+COUNTIF($R$2:$R$79,">"&2*SQRT(2/COUNT($R$2:$R$79)))

How do I add a second counter that ignores the ones that are in hidden rows?

Thanx
What version of Excel are you using?
 
Upvote 0
I would use cells to hold the value range otherwise the formula will be quite long.

T1:

=-2*SQRT(2/SUBTOTAL(102,R2:R79))

U1:

=2*SQRT(2/SUBTOTAL(102,R2:R79))

Then:

<?XML:NAMESPACE PREFIX = T1))+SUMPRODUCT(SUBTOTAL(102,OFFSET(R2,ROW(R2 /><T1))+SUMPRODUCT(SUBTOTAL(102,OFFSET(R2,ROW(R2:R79)-ROW(R2),,1)),--(R2:R79>=SUMPRODUCT(SUBTOTAL(102,OFFSET(R2,ROW(R2:R79)-ROW(R2),,1)),--(R2:R79 < T1))+SUMPRODUCT(SUBTOTAL(102,OFFSET(R2,ROW(R2:R79)-ROW(R2),,1)),--(R2:R79 > U1))
</T1))+SUMPRODUCT(SUBTOTAL(102,OFFSET(R2,ROW(R2:R79)-ROW(R2),,1)),--(R2:R79>
 
Last edited:
Upvote 0
Hi

Another option:

=SUMPRODUCT(--(ABS(SUBTOTAL(109,OFFSET(R2,ROW(R2:R79)-ROW(R2),0)))>2*SQRT(2/SUBTOTAL(102,R2:R79))))
 
Upvote 0
Thanx so much :)) Works like a charm

Just wished I could understand this "subtotal" and "offset" thing better :)
 
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