+ Reply to Thread
Results 1 to 11 of 11

Price Break Lookup Help

  1. #1
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Lightbulb Price Break Lookup Help

    I’m trying to create a formula that returns the correct price from a list of price breaks. The lookup function needs to match both the part number and the order quantity. However, the order quantity could be in between two prices. In that case, it should return the lower price.

    The formula I’m using is =XLOOKUP(A3&B3,$F$3:$F$20&$G$3:$G$20,$H$3:$H$20,"",-1). This is how it breaks down:

    A3&B3 – I’m looking up both the value in column A and the value in column B

    $F$3:$F$20&$G$3:$G$20 – The range in which to find the values from columns A and B

    $H$3:$H$20 – The range of values to return if found

    “” – If nothing is found, return nothing basically

    -1 – This is the match mode. A -1 is described as “Exact match. If none found, return the next smaller item.”

    I listed what the correct price should be based on the parameters, and about half the values returned were wrong. But not all of them.

    I’m not married to the XLOOKUP. I’m just trying to find a way to get the right data.

  2. #2
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Re: Price Break Lookup Help

    I forgot the attachment. This would likely help.
    Attached Files Attached Files

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Price Break Lookup Help

    Administrative Note:

    Is your forum profile up-to-date and showing ONLY the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021, Excel 2024 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Re: Price Break Lookup Help

    Thank you for the information. I've updated my profile to show the version I am working with.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Price Break Lookup Help

    In C3 and copy down,

    =LOOKUP(A3 & TEXT(B3, "000"), $F$3:$F$20 & TEXT($G$3:$G$20, "000"), $H$3:$H$20)
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Re: Price Break Lookup Help

    Well that was easier than I expected. LOL....Thank you so much. That seems to work perfectly. Do you mind me asking why the quantity had to be converted to a text? Also, if there's no exact match for the quantity, how does the formula know which value to pick? I really aim to learn how a formula functions so that I can hopefully apply the knowledge in a future situation.
    Last edited by AliGW; 10-30-2024 at 11:49 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Price Break Lookup Help

    It works because LOOKUP returns the largest value of like type (number or text) that is not greater than the value sought. Appending the qty as text makes it sorts correctly; in Excel, "Bob2" is greater than "Bob100"

    Also, you have to have a qty 1 price for every item, and the price list must be in ascending order by part number and quantity.

  8. #8
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Re: Price Break Lookup Help

    Ahh...makes sense now on the text. I made sure to have the data sorted correctly.

    Does it return an #N/A if there is no valid price break? Say the part only has 5, 10, and 15, but I'm trying to find 3. I thought about that when I applied it to my larger file. Fortunately I don't have that problem right now, but just in case for later.
    Last edited by AliGW; 10-30-2024 at 11:49 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Price Break Lookup Help

    You MUST have a qty 1 price for every item so that there is a match to part number and qty; otherwise it will return the highest-qty price of the lexically lower part number.

    If you have a minimum order qty, then you can instead have a price for qty 0 and mark the price as N/A.

  10. #10
    Registered User
    Join Date
    09-21-2015
    Location
    Michigan
    MS-Off Ver
    MS365 Version 2407
    Posts
    6

    Re: Price Break Lookup Help

    Ok...that is good information to have. Thank you so much!!

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Price Break Lookup Help

    You're welcome.

+ 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] IF Statement to Calculate Price Break Quantities
    By JVT%^ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2023, 12:48 AM
  2. Lookup Previous Price In Price List
    By tomas777 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 06-22-2022, 10:53 PM
  3. VLookup for Price Break Point
    By jcdr91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2017, 01:41 PM
  4. [SOLVED] Lookup Code and return Price from Price Band
    By PaulHAG in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-16-2014, 11:06 AM
  5. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  6. product and quantity price break input into invoice
    By rebound in forum Excel General
    Replies: 9
    Last Post: 10-14-2011, 02:08 AM
  7. Price Break sum
    By jackdee in forum Excel General
    Replies: 1
    Last Post: 07-27-2009, 06:47 PM

Tags for this Thread

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