Hi Everyone,
I am having trouble on two fronts with this code.
First it doesn't like ("Sht") so the person can identify which sheet to activate.
Second it doesn't like the erow statement.
Dim Sht As String
Sht = InputBox("Please enter the period name")
Worksheets("Sht").Activate
Dim i As Long, myNEW As String, erow As String
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
For i = Lastrow To 2 Step -1
myNEW = Cells(i, "R")
If myNEW = "NEW" Then
Cells(i, "R").EntireRow.Cut
Worksheets("HOURS BY ID").Activate
erow = Sheet38.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Pates Destinantion:=Worksheets("Sheet38").Rows(erow)
End If
Next i
Thank you
I am having trouble on two fronts with this code.
First it doesn't like ("Sht") so the person can identify which sheet to activate.
Second it doesn't like the erow statement.
Dim Sht As String
Sht = InputBox("Please enter the period name")
Worksheets("Sht").Activate
Dim i As Long, myNEW As String, erow As String
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
For i = Lastrow To 2 Step -1
myNEW = Cells(i, "R")
If myNEW = "NEW" Then
Cells(i, "R").EntireRow.Cut
Worksheets("HOURS BY ID").Activate
erow = Sheet38.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Pates Destinantion:=Worksheets("Sheet38").Rows(erow)
End If
Next i
Thank you