-1

I am looking to match 4 columns of data in Microsoft Excel.

For example below is the data which I am looking partial match and retrieve 5th column data against A and B column Row in ColumnF.

ColumnA      ColumnB              ColumnC        ColumnD        ColumnE    ColumnF
Ajay Ramana  Managing director    Farah Khan     associate at   458
Farah Khan   associate            John clayton   Director sr    458

I have huge list of data to be automated.

I want to partial match A against C and B against D.

something which does the above task.

Hope you understand friends.

Zev Spitz
  • 13,950
  • 6
  • 64
  • 136
Kumar K
  • 11
  • 7

1 Answers1

0

If by partial match you mean one string contains the other, I would suggest opening an ADO connection to the worksheet and issuing the following SQL statement:

SELECT Field5
FROM [Sheet1$]
WHERE '%' + Field1 + '%' LIKE '%' + Field3 + '%'
   OR '%' + Field2 + '%' LIKE '%' + Field4 + '%'

See here for an example of how to connect to an Excel workbook using ADO and issuing SQL statements.

And a better example here.

Community
  • 1
  • 1
Zev Spitz
  • 13,950
  • 6
  • 64
  • 136