+ Reply to Thread
Results 1 to 8 of 8

Drop down list selection within IF formula

  1. #1
    Registered User
    Join Date
    12-03-2008
    Location
    US
    Posts
    8

    Drop down list selection within IF formula

    I would like to multiply an user input number (column A) by a factor based on the selection in a drop down list (column B). Column C is the formula to do the operation and display the answer, but I also want it to just be a blank cell if nothing is input in column A or selected in column B (not a 0). The factors associated with the selection in column B are in a separate Data sheet, as they may change periodically and need to be easily updated.

    First question, is there a more efficient way than nested IF statements? I used the following:

    =A4*(IF(B4="O1",'Calc Data'!E3,IF(B4="O2",'Calc Data'!E4,IF(B4="O3",'Calc Data'!E5,IF(B4="O4",'Calc Data'!E6,"")))))


    Second, the above works minus leaving Column C blank if no selection is made or no value is input in Column A. I get a #VALUE! error now if nothing is selected or no value in Column A. I can probably add more if statements to work it out, but I really don't want to do that and I'm sure I'm forgetting something that would make it easier.

    Thanks for the help!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Drop down list selection within IF formula

    This is a bit shorter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-03-2008
    Location
    US
    Posts
    8

    Re: Drop down list selection within IF formula

    Thanks for the reply! I'm not seeing any results from this formula, even after adding the missing comma and parenthesis...

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Drop down list selection within IF formula

    You're right about the parenthesis. OTOH no comma is missing that I can see
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Perhaps post a sample sheet ? ( see yellow banner)

  5. #5
    Registered User
    Join Date
    12-03-2008
    Location
    US
    Posts
    8

    Re: Drop down list selection within IF formula

    Here is a sample sheet with the different options I've tried and presented above. Thanks!
    Attached Files Attached Files

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Drop down list selection within IF formula

    It seems you could just use

    =IF(F4="","",E4*VLOOKUP(F4,'Calc Data'!$C$3:$E$6,3,0))
    HTH
    Regards, Jeff

  7. #7
    Registered User
    Join Date
    12-03-2008
    Location
    US
    Posts
    8

    Re: Drop down list selection within IF formula

    Thanks jeffreybrown, that seems to do the trick!

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Drop down list selection within IF formula

    You are very welcome and thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Creating IF formula based off drop-down list selection
    By scotty2tees in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2018, 01:57 PM
  2. Replies: 4
    Last Post: 07-06-2017, 10:19 AM
  3. Moving YTD Formula Based on drop down list month selection
    By Webbn111 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-28-2014, 02:22 PM
  4. Replies: 4
    Last Post: 07-18-2014, 07:21 PM
  5. Can a worsheet formula reference a drop down list selection?
    By 2Excel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2014, 04:48 AM
  6. Replies: 2
    Last Post: 08-15-2013, 07:03 AM
  7. [SOLVED] Formula that recognizes data from a drop down list selection
    By dwoodson297 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2013, 10:36 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