Dim val As Variant
val = Range("B1").Value
i = 1
Do While val <> ""
Range("A" & i).Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(RC[2],"" "",""0"",RC[3],"" "",""0"",RC[4])"
Range("M" & i).Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(C[-12],Foglio2!C[-12]:C[1],3,FALSE),"""")"
Range("N" & i).Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(C[-13],Foglio2!C[-13]:C,5,FALSE),"""")"
Range("O" & i).Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(C[-14],Foglio2!C[-14]:C[-1],6,FALSE),"""")"
Range("P" & i).Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(C[-15],Foglio2!C[-15]:C[-2],13,FALSE),"""")"
Range("Q" & i).Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(C[-16],Foglio2!C[-16]:C[-3],14,FALSE),"""")"
i = i + 1
val = Range("B" & i)
Loop
|