+ Reply to Thread
Results 1 to 5 of 5

If formula that compares Quantity before selecting a range to use

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    Albuquerque
    MS-Off Ver
    Excel 2010
    Posts
    5

    If formula that compares Quantity before selecting a range to use

    I don't know if I'm looking for the impossible, but...
    I want to avoid creating a table to use a vlookup against. My poor spreadsheet already has enough of those.
    I don't want to use VBA either.
    This is what I need to do.

    IF QUANTITY < 2
    DETERMINE THE "ABC CODE" BASED ON COST BASED ON THE RANGE BELOW:
    0 - 215 = C
    216 - 1899 = B
    1900 & GREATER = A

    IF QUANTITY >= 2
    DETERMINE THE "ABC CODE" BASED ON THE PRODUCT (QUANTITY * COST) FROM THE RANGE BELOW:
    0 - 2099 = C
    2100 - 17499 = B
    17500 & GREATER = A

    Any ideas?

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

    Re: If formula that compares Quantity before selecting a range to use

    =IF(Quantity<2, LOOKUP(Cost, {0,216,1900}, {"C","B","A"}), LOOKUP(Cost, {0,2100,17500}, {"C","B","A"}))
    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

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If formula that compares Quantity before selecting a range to use

    Sorry,
    But a little Correction..
    Here is the revised solution..
    =IF(Quantity<2, LOOKUP(Cost, {0,216,1900}, {"C","B","A"}), LOOKUP(Cost*QUANTITY, {0,2100,17500}, {"C","B","A"}))
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

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

    Re: If formula that compares Quantity before selecting a range to use

    Nice catch Vikas

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If formula that compares Quantity before selecting a range to use

    Thank you sir...

+ 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] COUNTIF where criteria compares year only in the range
    By FAL22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2013, 01:37 PM
  2. IF statement (non nested) that compares cell value against range
    By r2d3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2006, 08:11 AM
  3. IF statement (non nested) that compares cell value against range
    By r2d3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2006, 06:10 PM
  4. Selecting values from a list to add up to a specific quantity
    By goose in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2006, 09:20 AM
  5. Selecting amounts to display based on quantity
    By Ray Ash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2005, 07:05 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