+ Reply to Thread
Results 1 to 3 of 3

Code to evaluate FIFO for multiple items and dates.

  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    Saginaw, Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Code to evaluate FIFO for multiple items and dates.

    I am trying to find the right code to determine FIFO order based on criteria involving the values in three different cells of any given row. I have a column (A) containing many different 9 digit item numbers, a column (G) which is a location type, and a column (J) that contains expiration dates that occur in the future.

    First, I only want to compare rows that have the exact same value in column A. (There will be frequent occasions in which the value in cell A ,A2 for example, is exactly the same as the value in cells A3 through A15)

    Next, I want to determine which of the rows containing the exact same value in A, contains the expire date in J that occurs first. (Many rows will share the value in column A, and some will share the same date value in column J. If there are duplicate date values in column J, any one of the dates occuring soonest has to meet the criteria for the value in column G.)

    Finally, I want to establish whether or not the row, or any one of rows with the expire date occuring soonest is in the desired location. (There are only two different location values, PICK or RESERVE)

    I have attached a small example of what the data looks like at the point I need to place this code into a larger macro.
    Attached Files Attached Files
    Last edited by BillRush; 12-29-2011 at 11:11 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Code to evaluate FIFO for multiple items and dates.

    Make sure that all your dates are in fact dates and not text strings.

    Then in M2 this array formula
    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter not just Enter
    Drag/Fill Down
    Then filter by TRUE or FALSE as required.

    You could also use this for conditional formatting for J:J
    e.g. (See the attachment for full information.)
    Please Login or Register  to view this content.
    Note that C/F treats all formulae as arrays, so just use the formula as normal.

    Hpoe that this gives you a start.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    01-17-2011
    Location
    Saginaw, Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Code to evaluate FIFO for multiple items and dates.

    Perfect! Thank you Marcol! It's not discouraging that I failed to come up with this.... It's discouraging that I made failing look so hard and you have made the solution look so easy! I truly appreciate your assistance. BR

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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