Hello
Sub Macro4()
Columns("A:A").Select
Range("A16").Activate
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[6],'THEMATERIALSBROKEN'Sheet1!R1C1:R250C2,2,FALSE)"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:E300"), Type:=xlFillDefault
Range("A1:E300").Select
Selection.AutoFill Destination:=Range("A1:E300"), Type:=xlFillDefault
Range("A1:E300").Select
Selection.NumberFormat = "0"
End Sub
I dont know how to refer to "=VLOOKUP(RC[6],'THEMATERIALSBROKEN'Sheet1
THEMATERIALSBROKEN is another workbook with the vlookup table
Sub Macro4()
Columns("A:A").Select
Range("A16").Activate
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[6],'THEMATERIALSBROKEN'Sheet1!R1C1:R250C2,2,FALSE)"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:E300"), Type:=xlFillDefault
Range("A1:E300").Select
Selection.AutoFill Destination:=Range("A1:E300"), Type:=xlFillDefault
Range("A1:E300").Select
Selection.NumberFormat = "0"
End Sub
I dont know how to refer to "=VLOOKUP(RC[6],'THEMATERIALSBROKEN'Sheet1
THEMATERIALSBROKEN is another workbook with the vlookup table