View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patty Garrity Patty Garrity is offline
external usenet poster
 
Posts: 1
Default Moving Data from one sheet to another

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!