Consulting

Results 1 to 5 of 5

Thread: Vlookup the price in latest date

  1. #1

    Vlookup the price in latest date

    Hello,

    I want to vlookup sheet A and sheet B with column Manufacture Number.
    The vlookup must based latest date with latest price. Attached is the sheet 1 and sheet 2 is the result vlookup.

    I will use in VBA for this vlookup. Can anybody show me the way to solve this.

    Thanks

    From,
    Apple

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use these array formulae

    C2: =INDEX(Date!C:C,MATCH(1,(Date!$A$2:$A$20=Result!A2)*(Date!$B$2:$B$20=B2)*(D ate!$D$2:$D$20=D2),0)+1)

    D2: =MAX(IF((Date!A2:A20=Result!A2)*(Date!B2:B20=B2),Date!D2:D20))

    Watch out for spaces being inserted in Date!
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Hi XLD,

    Can you explain line by line as i do not understand. Thanks

  4. #4
    Hi,

    Sheet1 is my data
    Sheet name Fill in and compare: I will fill in manufacture number and compare. Press extract button
    Sheet name result: The output i need.

    Can anybody show me
    Last edited by apple; 08-15-2009 at 06:09 PM.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    This is what I mean
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •