Solved

Formula that returns any unique, visible value using AutoFilter or returns "All" if multiple values are visible

Posted on 2014-09-22
2
140 Views
Last Modified: 2014-09-22
Hello Experts,

Increase flexibility of my IF(SUBTOTAL formula (or any formula) to return ALL (ANY) unique value, beyond the current, limited design of just returning three results, Team "1" or "2", or, if AutoFilter is set to show more than one Team, then "All" is returned.  The current IF(SUBTOTAL operates with only two Teams, 1 and 2.   A new design will return *ANY, UNIQUE* Team number (value) when a filter is set on Column B.  

The purpose is to cause a chart title to properly reflect exactly which Team number, [1, 2, 3, ...n] has been filtered [is visible] when only a single team is [uniquely] visible.  Otherwise, "All" (meaning several) is returned signifying more than one team has been selected with AutoFilter.
 
I prefer a non-array formula solution if calculation will be excessively slow.  
A .XLSX file is attached with needs detail and to experiment on.
Thanks,
Berry
IF-SUBTOTAL-Formula-with-more-capability
0
Comment
Question by:Berry Metzger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40338101
Here is a non-array function that will display the team number when a single team is selected:
=IF(AND(SUBTOTAL(104,$B$5:$B$206)=SUBTOTAL(105,$B$5:$B$206)),SUBTOTAL(104,$B$5:$B$206),"All")

I'm comparing the MIN and the MAX of the SUBTOTAL results; if they are the same, then only one team is filtered and its value is shown in the cell.

Regards,
-Glenn
0
 

Author Closing Comment

by:Berry Metzger
ID: 40338195
That works!  Good job.
Thanks Glenn
Berry
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question