Solved

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

Posted on 2014-04-10
2
265 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
[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 22

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

733 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