Solved

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

Posted on 2014-09-22
2
139 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

749 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