Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel problem - Use of a formula with filters

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
GB
Hi,

I've come up against a bit of an excel problem that is driving me crazy....

I'm using this formula =COUNTIF(Data!F:F,"Yes")/(SUBTOTAL(3,Data!F:F)-1)

Which works fine with my data in it's normal state, however, I also want people to be able to view data based on filter values.

The Subtotal 3 part of the equation works fine with this but the countif function does not adapt to account for the filter...

Can anybody suggest an alternative???
 
Use another column with the formula =IF(F2="Yes",1,0) and copy it down, and use SUBTOTAL(9 on it instead of COUNTIF in your formula.




Cheers, Glenn.

My grandfather was ill, and my grandmother smeared goose-grease on his back. He went downhill very quickly after that.
 
Doc,

Try This:

=COUNTIF(Data!F:F,"Yes")/(COUNTA(Data!F:F)-1)

Filters will not change the formula's results.

Eugene
 
Doc, I just re-read your post. My formula won't work if you want the results to change with the filters. Glenn's solution will work...

Eugene
 
Cheers Glen... Works like a dream
 
Hi Dr Smyth,

glad to have been of some help [smile] .



Cheers, Glenn.

My grandfather was ill, and my grandmother smeared goose-grease on his back. He went downhill very quickly after that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top