+ Reply to Thread
Results 1 to 16 of 16

Lookup Code and return Price from Price Band

  1. #1
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Smile Lookup Code and return Price from Price Band

    Hi - I'm a new member with a problem I hope will be simple to most and an easy solution can be offered.

    As per the sample attachment, I have a list of data spanning over 3,000 lines. I want to lookup a code value, then look up a quantity and return a relevant price from the list. The price will be either equal to the quantity or the next price above if not an exact match (see criteria explanation in cells F2:G4).

    One added complication is that my lookup code may not now exist, as it is cross referencing an old price list. Therefore, if my code is not within the list, I need it to return an error.

    I am imagining a formula using INDEX, MATCH and LOOK UP, but I just can not crack it myself.

    Any help will be gratefully received! I hope it is clear what I need and a very simple solution is staring me in the face!

    Many thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Lookup Code and return Price from Price Band

    The formula for the next quantity/price above if no match is a lot easier than what your sheet is expecting (seems like it is expecting an interpolated value since 666 is in between the value above and below the one you specified. Can you confirm which one you actually want?
    Despite the high cost of living, it remains very popular.

    Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!

  3. #3
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    Thanks for the quick response - I really need it to return the next quantity below sorry - but can I request a formula for both? This would help with my understanding of how the formulas work. I appreciate it is more complex to look for the quantity below.

    Thanks

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Lookup Code and return Price from Price Band

    in your list, for the code 18300147, regardless of quantity, there is not price of 666.93 as you request (<< I WANT THIS TO RFETURN A VALUE OF £666.93)

    how did you come up with that value? what is the calculation that you want? it does not seem to be a simple "find the value based on criteria"
    Click on the star if you think I helped you

  5. #5
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Lookup Code and return Price from Price Band

    The yellow box you originally had does what you want. The yellow box in J2 along with the lookup above it in J1 does the interpolated value (which is still not the 666 number)

    Updated for what you want, I thought you wanted the next below line wise at first.
    Attached Files Attached Files
    Last edited by Hawkeye16; 06-16-2014 at 05:59 AM.

  6. #6
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    Apologies! As a "security measure" I amended the "real" values at the last minute!! The value I need to return is £682.63 - ie, the nearest value below. There are no complex calculations necessary for the return value.

  7. #7
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    I think it is almost there, many thanks for the quick responses and your time (much appreciated).

    I have attached an updated spreadsheet (Price Test 2) showing what I am trying to achieve and comments in red. I hope I am not overcomplicating and looking for too much?

    Cheers
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Lookup Code and return Price from Price Band

    I actually had redone the formula and reattached it. Must have been right after you downloaded it, my apologies. Can you try with the one that is currently attached in my post above?

  9. #9
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    Excellent! That is exactly what I am after - Thanks!

    The only issue I seem to have is for a quantity at the lowest band. For example, for code 16232904, a quantity below 600, which would put the result in the lowest price band of £2,061.45 is returning a #N/A Error..... Is there a fix for this?

  10. #10
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Lookup Code and return Price from Price Band

    Use this as an array formula (confirmed by pressing Ctrl+Shift+Enter).

    For Excel 2007 and above,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    For versions prior to Excel 2007,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  11. #11
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    Hi - many thanks for the formula above - this works great when the quantity is a match on the price list, but if the quantity is in between a band (ie, for code 16232877 a quantity of 700), the formula returns a blank as opposed to the price below......

  12. #12
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Lookup Code and return Price from Price Band

    There is always a fix, it is just going to make the formula a bit longer though. Give me a minute and I'll look at it.

  13. #13
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Lookup Code and return Price from Price Band

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This should work. IFERROR statement was added.
    Last edited by Hawkeye16; 06-16-2014 at 08:35 AM. Reason: apparently bold doesnt work in formulas

  14. #14
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    By jinks that got it! Many thanks for your help - works great. Glad I stumbled upon this great resource - full of great hints and tips.

    Cheers

  15. #15
    Registered User
    Join Date
    03-25-2014
    Location
    california, USA
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Lookup Code and return Price from Price Band

    so which attachment has the correct answer with the latest update? I want to check this out

  16. #16
    Registered User
    Join Date
    06-16-2014
    Posts
    8

    Re: Lookup Code and return Price from Price Band

    This attachment has the correct formula inserted. Very useful function (for me anyhow!)
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 07-24-2013, 12:13 PM
  2. [SOLVED] Looking up a price band?
    By mintribe in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-13-2013, 09:14 AM
  3. [SOLVED] Lookup two item code and package size, return price for match
    By tommypkoch in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 04:02 PM
  4. How many unique products in a price band
    By Steven811 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-09-2013, 10:59 AM
  5. Replies: 4
    Last Post: 08-15-2012, 09:49 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