
Range("P3").Select
ActiveCell.FormulaR1C1 = _
"=+IF(RC1="""",IF(ISNA(VLOOKUP(RC[-1],C3:C5,3,FALSE)),"""",VLOOKUP(RC[-1],C3:C5,3,FALSE)),"""")"
Range("P3").Select
Selection.AutoFill Destination:=Range("P3:AB3"), Type:=xlFillDefault
Range("P3:AB3").Select
Selection.AutoFill Destination:=Range("P3:AB8409") |
Sub Seleziona()
Dim ur as Long 'Definisco la variabile che memorizza il numero dell'ultima riga piena
ur = Cells(Rows.Count, 1).End(xlUp).Row
Range("a1:D" & ur).Select
Ens Sub
Quindi nel tuo caso potresti scrivere:
Range("P3:AB" & ur).Select
ovviamente inserendo le specifiche istruzioni nella tua macro
|
