Hi,
I just need a little bit of help with this code. I just about have it but not quite.
I need to match 2 different columns in 2 different workbooks. I need to match column b (sku) on workbook datafeed.xlsx to workbook result.xlsx on column b (sku), as shown in the code.
If no match from result.xlsx from workgroup datafeed.xlsx then I need it to put a number 0 in column/row ab2 which is offset to column 26 from b2.
So what I am thinking is offset 11 should be 26 but a value of 0?
thanks
If you need examples of workbooks I can provide those?
I just need a little bit of help with this code. I just about have it but not quite.
I need to match 2 different columns in 2 different workbooks. I need to match column b (sku) on workbook datafeed.xlsx to workbook result.xlsx on column b (sku), as shown in the code.
If no match from result.xlsx from workgroup datafeed.xlsx then I need it to put a number 0 in column/row ab2 which is offset to column 26 from b2.
So what I am thinking is offset 11 should be 26 but a value of 0?
thanks
If you need examples of workbooks I can provide those?
Code:
[/COLOR]Set w3 = Workbooks("datafeed.xlsx").Sheets("datafeed") Set w4 = Workbooks("result.xlsx").Sheets("Sheet 1")
For Each z In w3.Range("b2", w3.Range("b" & Rows.Count).End(xlUp))
XR = 0
On Error Resume Next
XR = Application.Match(z, w4.Columns("b"), 0)
On Error GoTo 0
If XR <> 0 Then w4.Range("o" & XR).Value = z.Offset(, 11)
Next z[COLOR=#333333]