View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default cut & paste between sheets based on cell data

One way:

If it's only to operate in the sheet named OPEN, put this in the
sheet's code module (right-click on the sheet's tab and select View
Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim sAddr As String
With Target
If .Count 1 Then Exit Sub
sAddr = .Address
Application.EnableEvents = False
.EntireRow.Cut Sheets(.Value).Range( _
"A" & Rows.Count).End(xlUp).Offset(1, 0)
Range(sAddr).EntireRow.Delete
Application.EnableEvents = True
End With
End Sub

In article ,
"Mike Reisinger" wrote:

sorry to leave out some key info. The row data is typically inputted
in the OPEN sheet. Column A (status) is a validation list. As the status
changes to HIRED, TRANSFER, etc, I would like the entire row to be cut and
pasted into the appropriate sheet. I would like it to be able to move
around between all sheets depending on the Column A (status).

Also, where exactly to I paste this?