+ Reply to Thread
Results 1 to 4 of 4

Find Nearest Price

  1. #1
    Registered User
    Join Date
    06-14-2005
    Posts
    22

    Find Nearest Price

    I have two worksheets, one which contains an item number and order date, and one which contains item number, start date and price. I am trying to lookup the price based on item number and order date and nearest price date.

    For example,

    Item 123

    Prices 01/01 = 10
    Price 01/02 = 20

    If I enter order date 31/12 it should NOT return a price

    Order date = 05/01 should return 10

    Order date = 30/01 should return 10

    01/02 = 20

    etc

    I have tried the INDEX / MATCH with MIN and ABS, but of course this finds the nearest date and so if I enter 30/01 this will return 20.

    Is there a formula which I can use which will pick the oldest nearest price?

    Thanks

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find Nearest Price

    Try this approach

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


    where B3:B19 are items, C2:I2 are dates and C3:I19 are prices.

    See the file
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-14-2005
    Posts
    22

    Re: Find Nearest Price

    Thank you - the process is exactly what I am after. The data source of the prices, may be tabular / record rather than matrix.

    I've tried adjusting as per the attached - but i get an error..
    Attached Files Attached Files

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find Nearest Price

    Try this if you have a version office 2010 and early
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or this array formula for prior versions of Office (CTRL+SHIFT+ENTER instead enter to confirm the formula)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-14-2005
    Posts
    22

    Re: Find Nearest Price

    Thank you so much for your help

    With some changes to the source data etc, I have now achieved what I was after. I have combined item number with another dimension, and concatenated this in the array formula - example below. (I've used ranges in the final version for performance improvement)

    Thank you once again.



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

+ 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] Round Price Up or Down to nearest $.99 based on a Condition
    By agent46 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2013, 05:56 PM
  2. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  3. Replies: 4
    Last Post: 10-31-2010, 09:37 PM
  4. Replies: 5
    Last Post: 04-16-2010, 07:17 AM
  5. Find nearest value
    By Two-Canucks in forum Excel General
    Replies: 7
    Last Post: 05-19-2006, 02:55 PM
  6. find nearest help
    By nobbyknownowt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2006, 08:40 AM
  7. How do I tell a price list to round up and down to the nearest 25
    By Philippa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2006, 09:00 AM
  8. [SOLVED] How do i round up a price to the nearest 5,10,15 etc pence
    By Millsy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2005, 10:06 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