+ Reply to Thread
Results 1 to 8 of 8

Drop down menu with totals

Hybrid View

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Drop down menu with totals

    Hi all,

    I would like to create a "drop down menu" of functions (sum, average, count, max, min, etc) that could be used to calculate a column in my spreadsheet. See below picture -- how do I do this? So for example, when you click "average" on the drop down menu, it calculates the average of all the numbers in the AP column. When you click "sum", it calculates the sum of all the values in the column AP.

    dropdown menu.png

    Let me know if this is unclear.

    Thank you!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Drop down menu with totals

    I think this can be done with creating a Validation list, CHOOSE function, and INDEX/MATCH formula

    1. Validation list in G2
    2. Formula in E2
    3. Range: C4:C8

    DataValidationList.JPG

    Formula in E2

    Formula: copy to clipboard
    =CHOOSE(INDEX({1,2,3,4,5},MATCH(G2,{"Count","Sum","Average","Max","Min"},0)),COUNT(C4:C8),SUM(C4:C8),AVERAGE(C4:C8),MAX(C4:C8),MIN(C4:C8))


    Formula.JPG
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Smile Re: Drop down menu with totals

    Quote Originally Posted by AlKey View Post
    I think this can be done with creating a Validation list, CHOOSE function, and INDEX/MATCH formula

    1. Validation list in G2
    2. Formula in E2
    3. Range: C4:C8

    Attachment 439268

    Formula in E2

    Formula: copy to clipboard
    =CHOOSE(INDEX({1,2,3,4,5},MATCH(G2,{"Count","Sum","Average","Max","Min"},0)),COUNT(C4:C8),SUM(C4:C8),AVERAGE(C4:C8),MAX(C4:C8),MIN(C4:C8))


    Attachment 439269
    Thanks, except the way your solution has it requires the "result" to be in a different cell than the drop down menu. IN my example, the drop down menu is the same cell as the result. I will attach the workbook so you can see exactly what I am looking for. I would like to repeat it exactly how it is done in the attached. Check out row 2355 in the "BK Data Tape" worksheet:

    Excel Test 2.xlsx


    Any ideas?


    Thank you all for your amazing help!!!

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Drop down menu with totals

    I don't think there is a need of index inside
    =CHOOSE(MATCH(G2,{"Count","Sum","Average","Max","Min"},0),COUNT(C4:C8),SUM(C4:C8),AVERAGE(C4:C8),MAX(C4:C8),MIN(C4:C8))
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Drop down menu with totals

    This was meant as a proof of concept. You can change cell references to whatever you like.

  6. #6
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Re: Drop down menu with totals

    Quote Originally Posted by AlKey View Post
    This was meant as a proof of concept. You can change cell references to whatever you like.
    Thanks! Your method works fine except I get a "circular reference" warning whenever I try to make the drop down menu the same cell as the calculated result... trying to figure out to fix this circular reference issue. Any ideas?

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Drop down menu with totals

    Can't help without seeing the file. BTW, the file you uploaded earlier is password protected.

  8. #8
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Re: Drop down menu with totals

    Quote Originally Posted by AlKey View Post
    Can't help without seeing the file. BTW, the file you uploaded earlier is password protected.
    Sorry. Ophrys is the password. It is made-up information.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Drop down menu totals
    By rjtyrell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2014, 04:59 AM
  2. Formula to calculate totals depending on Drop Down Menu
    By Hadda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2013, 09:41 PM
  3. Replies: 1
    Last Post: 02-07-2013, 11:03 AM
  4. [SOLVED] I cant work out how to create a drop down menu that relates to another drop down menu
    By louise2613 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-18-2012, 01:49 PM
  5. Replies: 2
    Last Post: 01-30-2009, 04:23 PM
  6. add totals via drop down menu
    By excellentexcel in forum Excel General
    Replies: 9
    Last Post: 01-15-2009, 05:12 PM
  7. [SOLVED] Drop down menu-How do you produce a drop down menu in a single cell in Excel
    By Freddo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-04-2006, 04:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1