+ Reply to Thread
Results 1 to 2 of 2

Modify Which Statistic is Performed with Drop-down

  1. #1
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Modify Which Statistic is Performed with Drop-down

    - In cell "C3" you can select either Average or Median

    - I need to perform '=average(DATA_RANGE)' or '=median(DATA_RANGE)' based on what is selected in "C3"

    - This equation: "="&INDIRECT("C3")&"("&"DATA_RANGE"&")" will return the text "=MEDIAN(DATA_RANGE)"

    - So I need to remember how to get Excel to look at my returned text as an equation. Any ideas would be appreciated!

    - I have this working fine now using a simple if statement "=IF(C3="MEDIAN",MEDIAN(DATA_RANGE),AVERAGE(DATA_RANGE))". But I'd really like to remember how I got something like this to work before so I can use it on more complicated situations

    Any thoughts would be appreciated.
    Thanks!

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Modify Which Statistic is Performed with Drop-down

    With the morefunc.xll add-in, you can use =EVAL(A1&"("&C1:C7&")"), with A1 being the dropdown and C1:C7 being the range. Keep in mind that this won't work for formulas requiring different argument lists, of course. Also, the add-in can be imbedded in the file, so you can share it with other users without a loss of functionality.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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