I am trying to make my index-match formula to find values and paste them in a new worksheet. I use a for to swipe the entire range. However, my code is not working and I do not understand why.
Here is an extract of it.
Thanks!
    Dim dimensions As Long
    dimensions = Worksheets("Rel_Raw").Range("A:A").Cells.SpecialCells(xlCellTypeConstants).Count
    Dim j As Long
    For j = 2 To dimensions Step 1
    Worksheets("Data").Cells(j, 1).Value = WorksheetFunction.Index(Worksheets("Rel_Data").Range("I1:I" & dimensions), _
    WorksheetFunction.Match(Worksheets("Data").Cells(k, 16).Value, Range("I2:I" & dimensions), 0))
    Next
 
    