G
Guest
ok here is my code it backs up a record to another sheet
Private Sub CommandButton2_Click()
For Each c In Worksheets("ART Report").Range("P310")
If c.Value = "p" Then
c.EntireRow.Copy
Sheets("Paid Recievables").Select
Set rng = Cells(Rows.Count, 1).End(xlUp)
Rows(rng.Row + 1).Select
Selection.Insert Shift:=x1Down
End If
Next
End Sub
and the the macro I first created that works:
Sub Pselect()
'
' Macro1 Macro
' Macro recorded 3/12/2003 by me
'
For Each c In Worksheets("ART Report").Range("P110")
If c.Value = "p" Then
c.EntireRow.Copy
Sheets("Paid Recievables").Select
Set rng = Cells(Rows.Count, 1).End(xlUp)
Rows(rng.Row + 1).Select
Selection.Insert Shift:=x1Down
End If
Next
End Sub
also I am trying to use this bit of code to set of the range of the for statement "Set rng = Cells(Rows.Count, 1).End(xlUp)" but have not got it to work as of yet?
any help is greatly appreciated
Private Sub CommandButton2_Click()
For Each c In Worksheets("ART Report").Range("P310")
If c.Value = "p" Then
c.EntireRow.Copy
Sheets("Paid Recievables").Select
Set rng = Cells(Rows.Count, 1).End(xlUp)
Rows(rng.Row + 1).Select
Selection.Insert Shift:=x1Down
End If
Next
End Sub
and the the macro I first created that works:
Sub Pselect()
'
' Macro1 Macro
' Macro recorded 3/12/2003 by me
'
For Each c In Worksheets("ART Report").Range("P110")
If c.Value = "p" Then
c.EntireRow.Copy
Sheets("Paid Recievables").Select
Set rng = Cells(Rows.Count, 1).End(xlUp)
Rows(rng.Row + 1).Select
Selection.Insert Shift:=x1Down
End If
Next
End Sub
also I am trying to use this bit of code to set of the range of the for statement "Set rng = Cells(Rows.Count, 1).End(xlUp)" but have not got it to work as of yet?
any help is greatly appreciated