Poniżej podaję kody moich czterech makr które chciałbym uruchomić z Arkusza1 a działanie tych makr miałoby się odbywać tylko w Arkuszu2.
Co muszę w tych kodach zmodyfikować ?
Sub LoopRange()
x = 1
Do While Cells(x, 8).Value <> ""
Cells(x, 8).Select
Selection.Copy
Cells(x, 8).Select
Selection.PasteSpecial Paste:=xlPasteValues
x = x + 1
Loop
x = 1
Do While Cells(x, 7).Value <> ""
Cells(x, 7).Select
Selection.Copy
Cells(x, 7).Select
Selection.PasteSpecial Paste:=xlPasteValues
x = x + 1
Loop
x = 1
Do While Cells(x, 6).Value <> ""
Cells(x, 6).Select
Selection.Copy
Cells(x, 6).Select
Selection.PasteSpecial Paste:=xlPasteValues
x = x + 1
Loop
x = 1
Do While Cells(x, 5).Value <> ""
Cells(x, 5).Select
Selection.Copy
Cells(x, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues
x = x + 1
Loop
x = 1
y = x + 1
Do While Cells(x, 1).Value <> ""
Do While Cells(y, 1).Value <> ""
If (Cells(x, 1).Value = Cells(y, 1).Value) And (Cells(x, 4).Value = Cells(y, 4).Value) Then
Cells(y, 1).EntireRow.Delete
Else
y = y + 1
End If
Loop
x = x + 1
y = x + 1
Loop
End Sub
Sub Zawartosc()
For Each MyCell In Range("H1:H1200")
If MyCell.Value Like "0" Then
MyCell.EntireRow.ClearContents
End If
Next
End Sub
Sub Usuwanie()
ost_wiersz = Range("A" & Rows.Count).End(xlUp).Row
For i = ost_wiersz To 1 Step -1
If Cells(i, 1).Value = "" Then
Rows(i).Delete shift:=xlUp
End If
Next i
End Sub
Sub Wstaw()
x = 1
Do While Cells(x, 1).Value <> ""
Cells(x, 1).EntireRow.Insert
Loop
End Sub