简体   繁体   中英

How can I calculate the average, min, max, range for a cell from a dropdown and it changes in Excel

I am trying to make price comparison between Dominos and Pizza Hut in Excel by making a dropdown list like this

Dropdown list image

And in the Dominos cell I'm trying to make it so that if you choose average price it shows the average price out of all the Dominos pizza prices which I've done a table on in another spreadsheet.

Dominos price table

What I am struggling with is how does this cell the one highlighted in green change it's price to whatever option you choose out of the dropdown.

I would appreciate it if someone helps me.

without knowing the name of your reference sheets or their ranges, you will have to update the references in the formula below to meet your needs:

IF(Price_Type_Cell="Average Price:",
   AVERAGE(Dominoes_Price_Range),
   IF(Price_Type_Cell="Maximum_Price:",
      MAXIMUM(Dominoes_Price_Range),
      IF(Price_Type_Cell="Minimum Price:", 
         MINIMUM(Dominoes_Price_Range),
         IF(Price_Type_Cell="Range Price:",
            "enter formula for Range Price",
            ""))))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM