+ Reply to Thread
Results 1 to 7 of 7

Nested If Statement

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Nested If Statement

    Hey Everyone,

    I'm having a tough time figuring out how to arrange a formula that will look off a table of various prices and return the appropriate fee.

    A simple workbook is attached as an example. Nested IF.xlsx

    Any help would be greatly appreciated. Thanks a lot!
    Last edited by DontExcelAtMuch; 07-09-2014 at 04:14 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,874

    Re: Nested If Statement

    You have to change the data in column B to match the headings in the table, so change "Base" to "Base Price". Once you have done that, put this formula in D2 and copy down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Nested If Statement

    This works to display the base price or the premium price, but the premium price should be added into the base price, if the product is in fact premium. How do I go about integrating this into the formula?

    As an example, a Blue, Premium should show $8.97 ($7.59+$1.38)

  4. #4
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Nested If Statement

    Just add the Base Price to the Premium Price calculation.

    The formula in C3 would be: =INDEX($I$3:$J$4,MATCH(A3,$H$3:$H$4,0),MATCH(B3,$I$2:$J$2,0))+C2
    The formula in C5 would be: =INDEX($I$3:$J$4,MATCH(A5,$H$3:$H$4,0),MATCH(B5,$I$2:$J$2,0))+C4

  5. #5
    Registered User
    Join Date
    06-20-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Nested If Statement

    Hi hoyasaxa215. I need a formula that I can pull down for large amounts of data though. Can't rely on having different formulas in the column for different data. I need one formula for everything

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,874

    Re: Nested If Statement

    I missed that the first time. However, what you describe is not good data design. You want one formula for everything, but your data means different things in different columns. My suggestion would be to have a column with Premium Add-On and then a new column with Premium Total. Then you would do a SUM in that column, and the label to look up would be Premium Total, and then you could use the same formula in all rows.

    It's hard to give more specific advice without seeing your real data layout. I get the sense this is a stripped-down example.

  7. #7
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Nested If Statement

    I concur. Break out the columns and do the calculations separately. It'll make for a much more robust model going forward.

+ 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] NEsted If statement
    By Damian37 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-03-2014, 05:12 PM
  2. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  3. Nested IF statement with OR
    By jsohng in forum Excel General
    Replies: 3
    Last Post: 01-06-2011, 06:26 PM
  4. Nested If Statement
    By Cerenity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2010, 11:51 AM
  5. Replies: 6
    Last Post: 01-14-2009, 06:59 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