ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moving Data from one sheet to another (https://www.excelbanter.com/excel-programming/274433-moving-data-one-sheet-another.html)

Patty Garrity

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!

Paula[_2_]

Moving Data from one sheet to another
 


Paula Pitre

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


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com