retrieve data

J

Jim O

I am trying to retrieve data stored in file by matching reference code could someone please help

File Location C:\LKU

Source file HC_DB.xl
Worksheet "M_DATA
Code reference in Column "B" format: #####.## - ## - ##
Data to retrieve in columns F, G, H, I, M,

Target file HC.xl
Worksheet "HC
Code reference in Column "B" format: #####.## - ## - ##
Target Cells D, E, F, H, I,

CODE READS AS FOLLOW

Private Sub CommandButton1_Click(

Dim XL As Excel.Applicatio
Set XL = New Excel.Applicatio
XL.Workbooks.Open "C:\LKUP\HC_DB.XLS

'GET DAT
For Each CL In Worksheets("HC").Range("B2", Worksheets("HC").Range("B65536").End(xlUp).Address
'IF VALUE IN "B" NOT EQUAL TO ZERO LOOKUP IN "HC_DB.XLS
If CL.Offset(0, 1).Text <> 0
The
With Worksheets("M_DATA").Range("B65536").End(xlUp).Offset(0, 2
.Value = CL.Valu
End Wit
End I
Next C

End Su

THANKS IN ADVANCE FOR HEL
HC.XLS HAS 2,100 ROW
HC_DB.XLS HAS 13,000 ROW
TOO LARGE FOR VLOOKU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top