ActiveCell.FormulaR1C1 = StrFormula
Range("A1:D1").Select
Selection.Copy
Range("A1:D" + Trim(Str(nriga - 1))).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
For nriga = 1 To 1000000
Range("A" + Trim(Str(nriga))).Select
If ActiveCell.Value = "" Then
Exit For
End If
For ncol = 1 To 4
Select Case 1 = 1
Case ncol = 1
col = "A"
Case ncol = 2
col = "B"
Case ncol = 3
col = "C"
Case Else
col = "D"
End Select
Range("" + col + Trim(Str(nriga))).Select
If ActiveCell(nriga, ncol) = "" Then
Exit For
End If
|