P
Patty Garrity
I need to edit someone elses code (below) so that the row is MOVED (not
just copied) to another worksheet:
If Cells(ProgRow, 3).Value = "HCOMT" Or Cells(ProgRow, 3).Value =
"SCOMT" Then
Range(Cells(ProgRow, 1), Cells(ProgRow, 13)).Select
Selection.Copy
On Error Resume Next
Sheets.Add.Name = "HCOMT"
On Error GoTo 0
Sheets("HCOMT").Select
Cells(HcomtRow, 1).Select
ActiveSheet.Paste
HcomtRow = HcomtRow + 1
Sheets(CurrentSheet).Select
End If
If Cells(ProgRow, 3).Value <> "HCOMT" Or Cells(ProgRow, 3).Value
<> "SCOMT" Then
Hours = Hours + Cells(ProgRow, 7).Value
Dollars = Dollars + Cells(ProgRow, 8).Value
ProgRow = ProgRow + 1
End If
Loop
CopyToRow = ProgRow - 1
DO YOU NEED TO SEE MORE OF THE CODE TO HELP ME?
Cheers, Thanks Alot!...Paula
just copied) to another worksheet:
If Cells(ProgRow, 3).Value = "HCOMT" Or Cells(ProgRow, 3).Value =
"SCOMT" Then
Range(Cells(ProgRow, 1), Cells(ProgRow, 13)).Select
Selection.Copy
On Error Resume Next
Sheets.Add.Name = "HCOMT"
On Error GoTo 0
Sheets("HCOMT").Select
Cells(HcomtRow, 1).Select
ActiveSheet.Paste
HcomtRow = HcomtRow + 1
Sheets(CurrentSheet).Select
End If
If Cells(ProgRow, 3).Value <> "HCOMT" Or Cells(ProgRow, 3).Value
<> "SCOMT" Then
Hours = Hours + Cells(ProgRow, 7).Value
Dollars = Dollars + Cells(ProgRow, 8).Value
ProgRow = ProgRow + 1
End If
Loop
CopyToRow = ProgRow - 1
DO YOU NEED TO SEE MORE OF THE CODE TO HELP ME?
Cheers, Thanks Alot!...Paula