+ Reply to Thread
Results 1 to 7 of 7

Choose dropdown list than automatically show formula?

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Choose dropdown list than automatically show formula?

    From D4:D50 i have a dropdown list with 3 options, If i choose option "CAR1" then automatically it will appear this formula in N4 "=IF(D4<>"";IF(D4="CAR1";I4-G4;G4-I4);""), If i choose option "CAR2" than it will appear this formula in N4 " =IF(F4="";"";IFERROR(N4*E4/5;0)) and If i choose option "CAR3" then automatically it will appear "=N4-G4/2". This need to be done for every collumn from D4:D50.

    What the best way to solve this problem?

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Choose dropdown list than automatically show formula?

    Your Formulas make no sense.

    But this is the method.


    =IF(D4="CAR1",I4-G4;G4-I4),"") & IF(D4="CAR2",IFERROR(N4*E4/5,0),"") & IF(D4="CAR3",N4-G4/2,"")
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Choose dropdown list than automatically show formula?

    Okay, since you have Excel 2016, you should be able to use the IFS function.

    First, you say if CAR3 is in D4, then “then automatically it will appear "=N4-G4/2” It will appear where? In N4 (Since that’s where the formulas for CAR1 and CAR2 appear)? That would create a circular reference. Please clarify
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Choose dropdown list than automatically show formula?

    Its a dropdown list with 3 options and each one will be related to a specif formula, after choosing an option a formula would be executed in N4.

  5. #5
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Choose dropdown list than automatically show formula?

    mehmetcik , your fomula isnt working.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,561

    Re: Choose dropdown list than automatically show formula?

    What the best way to solve this problem?
    I believe the best way would be to upload a sample spreadsheet that shows each of the options possible, say in D4:D8, along with some possible respective values in columns E, F, G and I and then manually type the output you would expect to see into the corresponding cells in column N based on the combination of options and values.

    To upload a sample spreadsheet (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Choose dropdown list than automatically show formula?

    You can't put a formula into N4 that refers back to itself. For example
    N4= N4-G2/5 would make no sense. Can you re-evaluate where you want to put these formulas?

    For the record, using the IFS function, this formula will work (just not in column N)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Replies: 5
    Last Post: 05-03-2016, 12:45 PM
  2. Hide rows & Dropdowns depending on a Master-Dropdown List (choose between 1 and 10)
    By chrisignm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2014, 07:26 PM
  3. VBA to show dropdown list
    By beat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2014, 07:20 AM
  4. use dropdown and show another item automatically
    By mtsf in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-14-2013, 03:06 AM
  5. Replies: 2
    Last Post: 08-31-2011, 11:26 AM
  6. Replies: 6
    Last Post: 05-18-2010, 09:59 AM
  7. Replies: 5
    Last Post: 03-12-2008, 05:01 PM

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