Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Location
    USA
    Posts
    66

    Unanswered: automating record search

    Greetings,

    Following is what I would like to automate:

    Take a record from Workbook #1 column D and search if this record exists in Workbook #2 Column P.

    If the record exists, then take the corresponding record from Column W in the same Workbook (workbook #2) and copy the record in Workbook #1 column H. If no match, then column H will be filled with n/a.

    Thank you in advance,

    OCM

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hello,

    A VLOOKUP() formula will do this. If you need to automate with VBA then use VBA to put formulae into the workbook, calculate, and then convert to values.

  3. #3
    Join Date
    Sep 2002
    Location
    USA
    Posts
    66

    Smile automating record search

    Thanks for your reply Colin,

    Following is what I tried:

    =VLOOKUP(D3,'[Workbook2.xlsx]Sheet1'!$P$2:$W$400,8,FALSE)

    =Vlookup(D3,'[Workbook2.xlsx]Sheet1'!P:W,8,FALSE)

    I was getting #N/A, and when a record exists, for some reason, the cell is filled w 0 when there is a match.


    Thanks,

    OCM

Posting Permissions

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