+ Reply to Thread
Results 1 to 16 of 16

How to make drop down list to change formulas in cell?

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    How to make drop down list to change formulas in cell?

    Hi

    In B5 I have drop down list with two options, AA44 and BB. I want so that when AA44 is choosed, cell G6 does function =B6/5. If BB is choosed, G6 does function =B6/2,5.

    User will enter number on B6 so the B6 number will be divided by either 5 or 2,5 by cell G6 depending if AA44 or BB is selected.

    Is this possible? I've tried IF and LOOKUP functions but can't get them to work.

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: How to make drop down list to change formulas in cell?

    Enter this formula in G6:

    =IF(B5=AA44,B6/5,B6/2.5)

  3. #3
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Quote Originally Posted by majosum View Post
    Enter this formula in G6:

    =IF(B5=AA44,B6/5,B6/2.5)
    Excel says the formula contains an error.

  4. #4
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: How to make drop down list to change formulas in cell?

    I'm sorry. When I saw AA44, I assumed it was a cell reference to the column AA. Now that I see you only wanted BB as well, try this:

    =IF(B5="AA44",B6/5,B6/2.5)

    My last formula was checking to see if B5 equaled the value in cell AA44.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to make drop down list to change formulas in cell?

    Try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If the Data Validation will not allow other values then

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 11-13-2013 at 07:31 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Quote Originally Posted by majosum View Post
    I'm sorry. When I saw AA44, I assumed it was a cell reference to the column AA. Now that I see you only wanted BB as well, try this:

    =IF(B5="AA44",B6/5,B6/2.5)

    My last formula was checking to see if B5 equaled the value in cell AA44.
    Still getting an error. Could you try with your Excel?

  7. #7
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Quote Originally Posted by newdoverman View Post
    Try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I get an error with this too could you try if it works in your Excel?

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to make drop down list to change formulas in cell?

    What exactly is the error that you are getting? Have you checked that the value in B6 is actually a number and not text caused by something other than the number being in the cell. Try entering a new value in B6.

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to make drop down list to change formulas in cell?

    Direct from my Excel.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: How to make drop down list to change formulas in cell?

    That workbook you attached is working perfectly for me.

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to make drop down list to change formulas in cell?

    In that case, there is something wrong either in B6 or in the value given in the drop-down list. Open up Data Validation and make sure that your entries there are absolutely correct. Do the same for B6. As you can see from the workbook that I sent you, the formula does work.

  12. #12
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Quote Originally Posted by newdoverman View Post
    Direct from my Excel.
    That works for me too, but the first one don't. There's a little difference in the last one. You replaced one , with ; and one ; with ,.

    Thanks.

    By the way, how did you make the drop down list? I made so that I wrote AA44 and BB in a column K and added them to the list that way.

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to make drop down list to change formulas in cell?

    In Data Validation, choose LIST and in the formula field that is at the bottom of the dialogue type in

    AA44, BB note that there is no equal sign and the values are separated by a comma.

    The semi colon won't work as a separator in formula elements for the most part. There are versions that use the semi colon instead of the comma. The formulae in these examples for this problem don't use semi colons they only use commas.

  14. #14
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: How to make drop down list to change formulas in cell?

    Although your profile states London, I suspect you are using a Continental version of Excel (French, maybe ?), and in that case you will need to use semicolons ; instead of commas in formulae, as you use a comma to denote the decimal point.

    Hope this helps.

    Pete

  15. #15
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Thanks for the help. I added AA44, BB but it added them on the same line on the drop down list. I changed it to AA44; BB and it worked.

  16. #16
    Registered User
    Join Date
    11-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to make drop down list to change formulas in cell?

    Quote Originally Posted by Pete_UK View Post
    Although your profile states London, I suspect you are using a Continental version of Excel (French, maybe ?), and in that case you will need to use semicolons ; instead of commas in formulae, as you use a comma to denote the decimal point.

    Hope this helps.

    Pete
    It looks like that is the case. Thanks for the tip.

+ 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. [SOLVED] How can you make a drop down list effect the value returned in a seperate cell?
    By pshaw5 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2013, 06:14 PM
  2. [SOLVED] Conditional Formulas - How do I make quantity of a cell change the value of other cells?
    By johnny.rockets in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-16-2013, 07:43 PM
  3. Replies: 1
    Last Post: 01-13-2009, 04:11 PM
  4. Replies: 3
    Last Post: 02-24-2008, 07:41 PM
  5. Replies: 2
    Last Post: 06-15-2005, 10:05 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