I'm getting:
Run Time Error '424' Object required
This is the code I am using to copy values of one range into another. Please let me know the issue with the same in the last line. I think the problem is arising when I try to create a range of a cell and the a cell which is offset
num_lines = 4
Set ws = Sheets("Working BoM")
Set ws_ref = Sheets("BoM")
For i = 1 To num_lines
match_value = Sheets("Line Info").Range("C" & Trim(Str(i))).Value
match_range = ws_ref.Range("A2:Y2")
bom_pos = Application.WorksheetFunction.Match(match_value, match_range, 0)
bom_cell = ws_ref.Range(ws_ref.Cells(2, bom_pos).Address)
ref_cell = ws.Range(ws.Cells(1, 4 * (i - 1) + 1).Address)
num_rows = ws_ref.Range("A2").Offset(0, bom_pos - 1).End(xlDown).Row - 1
ws_ref.Range(bom_cell, bom_cell.Offset(num_rows, 2)).Copy _
Destination:=ws.Range(ref_cell, ref_cell.Offset(num_rows, 2))
Next i