hello i was hoping i could get some help on this-i might be missing something small. i want to run this code together in one module with two separate times and different variables.

Set rng = .Range("A2", .Range("A" & Rows.Count).End(xlUp)) REPLACE with Set rng = .Range("B2", .Range("B" & Rows.Count).End(xlUp))

.Range("B2").FormulaArray = "=index(" & rng.Offset(, 3).Address(, , , 1) & ",match(a2&""|""&c2," & rng.Address(, , , 1) & "&""|""&" & rng.Offset(, 1).Address(, , , 1) & ",0))" REPLACE with .Range("F2").FormulaArray = "=index(" & rng.Offset(, 3).Address(, , , 1) & ",match(E2&""|""&D2," & rng.Address(, , , 1) & "&""|""&" & rng.Offset(, 1).Address(, , , 1) & ",0))"

HTML Code: