Solved

How can I display the argument type of a cell's SUBTOTAL() function

Posted on 2014-04-10
2
261 Views
Last Modified: 2014-04-10
I have a table the bottom row of which contains formulas for SUBTOTALS. Sometimes it may be a Sum, Average, Minimum or Maximum. I would like to have an adjacent cell with text that tells which of those types is currently selected, Is there a way to extract that information from the cell with the formula?
0
Comment
Question by:BobArnett
2 Comments
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 39992908
Using VBA code it is possible to read the formula, find the type code in the Subtotal formula and display that in a cell, either the number, or a text.

I think it would be as good to do it the opposite way, and that don't require macro activation.
Make a list with the subtotal types you want to use, and the corresponding type numbers.
Use Data validation to select the type (name), and use a Vlookup to get the number for the subtotal formula.
The list can be placed on another sheet, and use a range name for the data validation input.
Excel require the validation list to be on the same sheet, but not if it is a range name.
See example.
Subtotal-type-select.xlsx
0
 

Author Closing Comment

by:BobArnett
ID: 39992934
I agree, your second idea would fit the best for what I want to do. Thanks for the quick and helpful reply.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now