Closed Thread
Results 1 to 4 of 4

finding closest date after a referenced date for a specific item from an array

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    finding closest date after a referenced date for a specific item from an array

    I have 2 separate arrays of 2 columns with data starting in row 6 and text in columns in between the 2 arrays. The first array has Item names and buy dates columns K & L. The second array has Item names and sold date columns R & S.

    I need to find the date each Item that was bought was sold. There are multiple buys of the same item so the sold date must be the first date after to purchase date for that item. I tried vlookup and match but couldn't get it to work. I keep trying to use an array but am struggling with it.

    Thanks in advance,
    Doug

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: finding closest date after a referenced date for a specific item from an array

    Hi Doug,

    Please post a sample template of your workbook here using "Go Advanced" option.

  3. #3
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: finding closest date after a referenced date for a specific item from an array

    I have attached a spreadsheet and am modifying what is needed.

    The spreadsheet has 2 2 column arrays, with an item number and a date. The first array has the items and buy dates and the second has the items and sell dates. The items repeat themselves and there can be more then one of the same items at the same time, which is where I have the problem. When there are more than 1 of the same items and I look up the items sell date if it is the 2nd, 3rd, 4th… it picks the first date as the sell date for all of them. I need the formula to pick the next remaining date using the first in first out method.
    Example if there are 4 "item b"’s that were purchased at different dates when the second one is sold it needs to find the second oldest sell date (as the oldest sell date was used when the first item b was sold) and so on through the Nth time. see highlighted cells for the error.
    I have tried 3 different arrays and match combos see try 1,2 and 3, but can’t seem to get the multiple item issue resolved.

    Any thought are appreciated.
    Attached Files Attached Files
    Last edited by uptickdk; 05-15-2014 at 07:25 PM. Reason: error and attaching file

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: finding closest date after a referenced date for a specific item from an array

    Thread posted in Commercial services, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Finding the closest Date - Lookup
    By dluhut in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-08-2013, 04:58 PM
  2. Finding a date closest to the target date.
    By shakes347 in forum Excel General
    Replies: 11
    Last Post: 09-08-2010, 02:45 PM
  3. finding closest date between two arrays
    By adam9999 in forum Excel General
    Replies: 1
    Last Post: 01-19-2009, 04:17 PM
  4. Finding Closest Date in a List
    By Fonzy in forum Excel General
    Replies: 9
    Last Post: 04-10-2008, 08:54 PM
  5. Replies: 1
    Last Post: 05-27-2006, 04:00 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