
Sub Importa_DB()
Dim wk2 As Workbook
Dim sh2 As Worksheet
Application.ScreenUpdating = False
Set wk2 = ThisWorkbook
Set sh2 = wk2.Worksheets("DB")
With sh2
n = Worksheets("DB").Cells(Worksheets("DB").Rows.Count, "K").End(xlUp).Row
If n > 1 Then
n = n - 1
For i = 2 To n Step 1
Worksheets("DB").Range("A" & i & ":J" & i).Copy
Worksheets("DB").Range("A" & i + 1 & ":J" & i + 1).PasteSpecial xlPasteFormulas
Next i
Else
MsgBox "Non ci sono formule da copiare", vbInformation
End If
End With
End Sub |
Sub Importa_DB()
Dim sh2 As Worksheet
Dim n As Integer
Application.ScreenUpdating = False
Set sh2 = Sheets("DB")
With sh2
n = .Cells(.Rows.Count, "K").End(xlUp).Row
If n > 1 Then
.Range("A2:J2").Copy
.Range("A2:J" & n).PasteSpecial xlPasteFormulas
Else
MsgBox "Non ci sono formule da copiare", vbInformation
End If
End With
Application.ScreenUpdating = True
End Sub
|
