E
enyaw
I need to paste information into another sheet but i need to paste it into
the next empty row. This is the formaula i have so far. Can anyone help?
Sub copyData()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim rng2 As Range, j As Long, i As Long
Set sh1 = Worksheets("Sheet1")
Set sh2 = Worksheets("Sheet2")
Set rng2 = sh2.Cells(Rows.Count, 1).End(xlUp)(2)
j = 1
For i = 1 To 31
If IsNumeric(sh1.Cells(i, 1)) Then
If sh1.Cells(i, 1) > 0 Then
sh1.Cells(i, 1).EntireRow.Copy
rng2(j).PasteSpecial xlValues
rng2(j).PasteSpecial xlFormats
j = j + 1
End If
End If
Next i
Range("B2:B30").Select
Selection.ClearContents
Range("B2").Select
End Sub
the next empty row. This is the formaula i have so far. Can anyone help?
Sub copyData()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim rng2 As Range, j As Long, i As Long
Set sh1 = Worksheets("Sheet1")
Set sh2 = Worksheets("Sheet2")
Set rng2 = sh2.Cells(Rows.Count, 1).End(xlUp)(2)
j = 1
For i = 1 To 31
If IsNumeric(sh1.Cells(i, 1)) Then
If sh1.Cells(i, 1) > 0 Then
sh1.Cells(i, 1).EntireRow.Copy
rng2(j).PasteSpecial xlValues
rng2(j).PasteSpecial xlFormats
j = j + 1
End If
End If
Next i
Range("B2:B30").Select
Selection.ClearContents
Range("B2").Select
End Sub