+ Reply to Thread
Results 1 to 9 of 9

Multiple if and drop down formula?

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple if and drop down formula?

    Hi.

    I'm trying to see if there's a formula that would solve for the following:

    I have multiple selections in a drop-down that each correspond with different values within a range.

    For example, an education facility that's between 1001-10000 square feet costs v to build but costs x to build if between 10001-100000 square feet and a retail facility costs y between 1001-10000 and z to build between 10001-100000 square feet, and so on. Ideally, I would choose from the drop down and enter the precise square footage in one cell and the cost would automatically populate in another.

    Is there a way to do this? I've been playing around with another different options but I can't seem to solve for both the multiple costs per square feet or the multiple building types.

    Thanks!

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Multiple if and drop down formula?

    Does the attached work?
    Enter the square footage and building type in the grey cells, and the blue cell will give you the cost per square foot.
    Attached Files Attached Files
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Multiple if and drop down formula?

    That looks like it should work wonderfully, thanks!!

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Multiple if and drop down formula?

    Glad to help.
    I never thought to use the MATCH function in a VLOOKUP before. Pretty handy, especially in this scenario.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Multiple if and drop down formula?

    just fyi, a regular index/match would also have worked...
    =INDEX($B$1:$E$6,MATCH(L3,B1:B6,1),MATCH(L4,B1:E1,0))

    Nice solution though
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Multiple if and drop down formula?

    you can definitely do this, however, i'm a bit confused when you say:

    Quote Originally Posted by kwalker View Post
    Ideally, I would choose from the drop down and enter the precise square footage in one cell and the cost would automatically populate in another.
    what would you like to choose in the drop down? is it the building type, then you will type in the exact sq footage? this makes a difference in implementation.

    i'm guessing that you will have a drop down for building type, and a drop down for sq footage in a range (ie 1001 - 10000) and use those to give an estimated cost,
    then you will use the building type and a different cell in which you enter the exact sq footage to give you an actual cost?

    let me know if i'm on the right track so i can better help you out

  7. #7
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Multiple if and drop down formula?

    Re: FDibbins
    Would the INDEX function work if you are not putting in exact matches for the square footage? I figured you would need to use VLOOKUP with TRUE as the range lookup in order for it to be able to return the correct $ if you entered in 10050, for example.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Multiple if and drop down formula?

    try it on the file you uploaded, and note that I used 1, not ) for the row match....

    =INDEX($B$1:$E$6,MATCH(L3,B1:B6,1),MATCH(L4,B1:E1,0))

  9. #9
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Multiple if and drop down formula?

    Of course!
    I've always just used "0" in the Match function, so it didn't occur to me to use "1".

+ 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