+ Reply to Thread
Results 1 to 5 of 5

Conditional V Lookup at multiple lines

  1. #1
    Registered User
    Join Date
    04-03-2005
    Posts
    58

    Conditional V Lookup at multiple lines

    The question may sound naive since i am not sure whether this functions. But following is the output i am looking for.

    Sheet 1 i have item code, item description, stock quantity at the year end date.

    Sheet 2 i have purchase details of all items during a financial year. An item may be purchased only once or more number of times. Every single purchase transaction is depicted at separate line. i want to fetch the value of v lookup quantity of last purchases which will match or be greater than the stock quantity.

    E.g. Item A is having stock quantity 10 in sheet 1. To fetch the last purchase date i have sorted sheet 2 in descending manner on dates. Thus by logic last purchase is fetched as say, 11th dec 08 with 3 quantity. Now still i am short with 7 quantity to match the stock. Hence i want to fetch next transaction which will match with the balance requirement or again will go for next transaction.

    is the above manageable with vlookup or something else ?

    thanks in advances.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Conditional V Lookup at multiple lines

    can you upload an example?
    Never use Merged Cells in Excel

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional V Lookup at multiple lines

    A sample would be helpful, if you were to sort your data on Sheet2 such that dates were always in Ascending order then I think if we assumed:

    Sheet2
    Column A: Item Code
    Column B: Description
    Column C: Date
    Column D: Stock

    Sheet1
    A1: Item Code of Interest
    B1: Description
    C1: Stock Quantity

    and

    D1: is to return the date from last transaction on Sheet2 where Item Code & Quantity criteria (Sheet1!A1 & C1) are met then perhaps:

    D1: =LOOKUP(2,1/((Sheet2!$A$1:$A$1000=$A1)*(Sheet2!$D$1:$D$1000>=$C1)),Sheet2!$C$1:$C$1000)

  4. #4
    Registered User
    Join Date
    04-03-2005
    Posts
    58

    Re: Conditional V Lookup at multiple lines

    As you would observe from the attachment, I have stock quantity in sheet 1 against each item. I have purchase transactions for all items in sheet 2. Now stock quantity in sheet 1 is 27 as at 31-12-08. With FIFO method i want to identify which are the purchase transactions of which stock is lying. Thus document number 967 (qty 8), 789 (qty 15) & 567 (qty 10) will qualify this logic.

    i would like to either
    populate all such three purchase transactions in sheet 1
    or highlight three of them since they qualify
    or total all those three purchase quantities and call them in sheet 1 against that item code
    or any other feasible solution you might think of.

    My objective of doing the whole exercise is to find out inventory ageing. is it possible by any chance ?

    thanks in advance.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-03-2005
    Posts
    58

    Re: Conditional V Lookup at multiple lines

    Any solution possible for this query ?

+ 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