+ Reply to Thread
Results 1 to 4 of 4

Multi Part IF statement

  1. #1
    Registered User
    Join Date
    08-24-2007
    Posts
    52

    Multi Part IF statement

    I am hoping someone can help me with this IF statement

    Column I = Quantity ordered
    Column J = Price for quantity of 11 or less ($10.00)
    Column K = Price for quantity greater than 11 but less than 24 ($9.00)
    Column L = Price for quantity of 24 or more ($8.00)

    Here is what I have tried and I get an error message saying to many variables.

    =IF(I6<=11,I6*J6,IF(I6>11, but<=23,I6*K6,IF(I6>23,I6*L6)))

    Any help would be much appreciated

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: Multi Part IF statement

    Try this:

    =IF(I6<=11,I6*J6,IF(AND(I6>11,I6<=23),I6*K6,IF(I6>23,I6*L6)))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: Multi Part IF statement

    there isn't an IF BUT but there is an IF OR and IF AND however you don't need the second IF (I6>11, but<=23) part,
    When you have an if / then statement the first time the "THEN" part of the statement that completes the criteria is met the formula stops.
    So this should work for you... =IF(I6<=11,I6*J6,IF(I6<=23,I6*K6,IF(I6>23,I6*L6))) and if there is always something in I6 then the last IF could also be omitted like...
    =IF(I6<=11,I6*J6,IF(I6<=23,I6*K6,I6*L6))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    08-24-2007
    Posts
    52

    Re: Multi Part IF statement

    Great explanation and thank you for your help!!

+ 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. Baseball Multi-Hit Part 2
    By baseballrebel88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-28-2019, 09:07 PM
  2. refer part of a multi dimension array
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-24-2017, 10:14 PM
  3. Complicated multi part IF formula
    By drocus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-25-2015, 12:31 AM
  4. Nested IF statement validating part 1 but not part 2 of conditional
    By methuselah90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2014, 02:39 PM
  5. Multi part if statement
    By scruz9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-22-2014, 07:52 AM
  6. Replies: 0
    Last Post: 03-29-2009, 10:55 PM
  7. Transferring part of a multi-dimensional array to a range in VBA
    By Bob J. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2005, 11: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