Hello,

I want to wirte a new column by inserting information form a lookup table through a macro.

The code is not working from the for loop on. I would appreaciate any help or hints.


Thank you in advance!!

Anna


Sub Add_Retrofit_Column()
' Add_Retrofit_Column

Worksheets("EUROPE").Activate

Range("A1").End(xlToRight).Offset(0, 1).Select
ActiveCell.Value = "RETROFIT"


Dim i As Integer
Dim j As Integer

For i = 1 To Worksheets("EUROPE").Range("TECH").End(xlDown).Count
For j = 1 To Worksheets("Options").Range("TECH").End(xlDown).Count
If Worksheets("EUROPE").Cells(i, [@[TECH]]).Value = Worksheets("Options").Cells(j, [@[TECH]]).Value Then
Worksheets("EUROPE").Cells(i, [@[Retrofit]]).Value = Worksheets("Options").Range(j, [@[Retrofit]]).Value
End If
Next j
Next i

End Sub