lundi 28 mars 2016

Vlookup with filter logic

I am trying to create a macro to pull specific data into a consolidated worksheet from a different workbook. There a numerous variables that are shared between the two files, but there are duplicates, etc.

I would like base the original vlookup on the Variable Serial Number, and pull in an AssetID. The serial number does not have duplicates, but much of the data is missing from the file i am pulling from.

In essence i would like to pull data using the serial number, but if there are no matches..to run down the list of variables and when all the variables match, to populate the correct AssetID.

The variables that are shared between the files are below with their given column Indices.

Consolidated File

  1. Serial #: Column B
  2. Sales Order #: Column R
  3. Contract #: Column A
  4. Party #: Column C
  5. Account Name: Column J
  6. AssetID: Coumn AD
  7. Sales Rep: Column W
  8. Target Zone: Column P
  9. District Division: Column D
  10. Area: Column F
  11. Asset Age:Column K
  12. Contract end date: Column O
  13. Target zone reason: Column Q
  14. Install State: T
  15. Install City: U
  16. Install Address: V
  17. Last Dial Home Period: M

Pull File:

  1. Serial #: Column S
    1. Sales Order #: Column CC
    2. Contract #: Column BU
    3. Party #: Column AQ
    4. Account Name: Column K
    5. AssetID: Coumn AB
    6. Sales Rep: Column L
    7. Target Zone: Column I
    8. District Division: Column M
    9. Area: Column O
    10. Asset Age:Column W
    11. Contract end date: Column AC
    12. Target zone reason: Column CM
    13. Install State: AV
    14. Install City: AW
    15. Install Address: AX
    16. Last Dial Home Period: CG

I am just looking for a simple starting point. I believe i can build upon the logic once i have it started.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire