Move row to a different worksheet when criteria is met

  • Thread starter Thread starter BCarter
  • Start date Start date
B

BCarter

I am new to VBA and Macros and am in the process of learning, so be
patient with me.

I am creating a employee list with 30 columns of data. We have a high
turn over. So when I enter a date into "release date" I would like that
row (information) to move to a "Inactive Employee Worksheet", and move
the other rows up so I will not have blank rows.

Any suggestions would be helpful!
 
I would just cut-and-paste each row...are you entering a
massive amount of release dates at any one time? If it's
only one at a time, sometimes it's good to keep it simple.
 
Code something like this .. ?

'-------------------------------------------------
'- Transfer current row to bottom of another worksheet
'- BrianB
Sub TRANSFER_ROW()
Dim Fromsheet As Worksheet
Dim FromRow As Long
Dim Numcols As Integer
Dim ToSheet As Worksheet
Dim ToRow As Long
Dim CopyRange As Range
'-----------------------
'- destination
Set ToSheet = Workbooks("Book2.xls").Worksheets("Sheet1")
ToRow = ToSheet.Range("A65536").End(xlUp).Row + 1
'---------------------------------
'- current row
Set Fromsheet = ActiveSheet
FromRow = ActiveCell.Row
Numcols = ActiveSheet.Range("IV" & FromRow).End(xlToLeft).Column
Set CopyRange = Fromsheet.Range(Cells(FromRow, 1), Cells(FromRow,
Numcols))
CopyRange.Copy Destination:=ToSheet.Range("A" & ToRow)
End Sub
'--- eop -------------------------------------------------
 
Back
Top