Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Help, I need a formula for work.

Help, I need a formula for work.
Here is a generic version of my problem


Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
National Phillies Yes
National Mets Yes
National Giants Yes
National Dodgers No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")
Total would be 5 "YES'' Answers
______________________________________________
Now the spreadsheet is FILTERED to only show "AMERICAN"

Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")

Does anybody know of a formula that I may use the same range (e3:e10) but now since it is FILTERED the answer would be 2 instead of 5?

Any help would be greatly appreciated. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Help, I need a formula for work.

Hi,

Try this

SUBTOTAL(103,range)

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Che028" wrote in message
...

Help, I need a formula for work.
Here is a generic version of my problem


Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
National Phillies Yes
National Mets Yes
National Giants Yes
National Dodgers No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")
Total would be 5 "YES'' Answers
______________________________________________
Now the spreadsheet is FILTERED to only show "AMERICAN"

Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")

Does anybody know of a formula that I may use the same range (e3:e10)
but now since it is FILTERED the answer would be 2 instead of 5?

Any help would be greatly appreciated. Thanks in advance.




--
Che028


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Help, I need a formula for work.

Not if it is filtered to show American, it would return 4 and not 2


=SUMPRODUCT(--(E2:E10="YES"),--SUBTOTAL(3,OFFSET($E$2,ROW($E$2:$E$10)-MIN(ROW($E$2:$E$10)),,)))


will return 2


--


Regards,


Peo Sjoblom



"Ashish Mathur" wrote in message
...
Hi,

Try this

SUBTOTAL(103,range)

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Che028" wrote in message
...

Help, I need a formula for work.
Here is a generic version of my problem


Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
National Phillies Yes
National Mets Yes
National Giants Yes
National Dodgers No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")
Total would be 5 "YES'' Answers
______________________________________________
Now the spreadsheet is FILTERED to only show "AMERICAN"

Leauge Team Attendance exceed 20,000?

American Yankees Yes
American Red Sox No
American Twins No
American Angels Yes

=COUNTIF(E3:E10,"YES")

Does anybody know of a formula that I may use the same range (e3:e10)
but now since it is FILTERED the answer would be 2 instead of 5?

Any help would be greatly appreciated. Thanks in advance.




--
Che028




  #4   Report Post  
Junior Member
 
Posts: 3
Default

THANK YOU Peo Sjoblom! THIS FORMULA WILL SAVE ME SO MUCH TIME!
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Help, I need a formula for work.

My pleasure

--


Regards,


Peo Sjoblom

"Che028" wrote in message
...

THANK YOU Peo Sjoblom! THIS FORMULA WILL SAVE ME SO MUCH TIME!




--
Che028





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Help, I need a formula for work.

What about:
SUBTOTAL(3,range)

Not sure why this simple version wouldn't work, if Autofilter is being
used.
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Help, I need a formula for work.

Because it is filtered for American only, of course you
can apply another filter for yes/no but given the OP
requirements it won't work unless you do that.
Of course it can be that the yes/no column is already filtered by something
else?

That formula will de-facto give you the opportunity to do a "countif"
of filtered values


--


Regards,


Peo Sjoblom

"Spiky" wrote in message
...
What about:
SUBTOTAL(3,range)

Not sure why this simple version wouldn't work, if Autofilter is being
used.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Help, I need a formula for work.

Seems like if you are going to the trouble of filtering, you may as
well do it on 2 columns. Instead of filtering one and using a formula
to "filter" the other.

Otherwise, I'd say the best route is to use the formula for both and
skip the filter altogether.

Plenty of options.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I Need get work this formula ytayta555 Excel Worksheet Functions 4 August 1st 08 01:31 PM
IF-then formula doesn't work pegman Excel Discussion (Misc queries) 6 January 5th 08 06:55 PM
Why does this formula not work? dk_ Excel Discussion (Misc queries) 14 September 28th 06 09:18 PM
FORMULA DOESN'T WORK Loyd Excel Discussion (Misc queries) 4 March 30th 06 06:17 PM
A search for $ in a formula use to work now it does not work JuneJuly Excel Discussion (Misc queries) 2 November 30th 05 10:13 PM


All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"