Home |
Search |
Today's Posts |
#1
|
|||
|
|||
moving a row between worksheets
I want to write VBA code that does the following: When a value in column E
is changed to "John" that entire row is moved to a worksheet (in the same spreadsheet) called "Assigned". Is this possible? Thanks! |
#2
|
|||
|
|||
Amit,
I've uploaded the file with code to http://Galimi.com/Examples/MS.xls Following is the code to be embedded as a Change event on the sheet that recognizes the word John: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 5 Then If Target.Value = "John" Then 'Move the column to the Assigned sheet Rows(Target.Row).Copy shtAssigned.Rows(shtAssigned.UsedRange.Rows.Count + 1) End If End If End Sub http://HelpExcel.com "Amit" wrote: I want to write VBA code that does the following: When a value in column E is changed to "John" that entire row is moved to a worksheet (in the same spreadsheet) called "Assigned". Is this possible? Thanks! |
#3
|
|||
|
|||
This is awesome, thanks Galimi!
"galimi" wrote in message ... Amit, I've uploaded the file with code to http://Galimi.com/Examples/MS.xls Following is the code to be embedded as a Change event on the sheet that recognizes the word John: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 5 Then If Target.Value = "John" Then 'Move the column to the Assigned sheet Rows(Target.Row).Copy shtAssigned.Rows(shtAssigned.UsedRange.Rows.Count + 1) End If End If End Sub http://HelpExcel.com "Amit" wrote: I want to write VBA code that does the following: When a value in column E is changed to "John" that entire row is moved to a worksheet (in the same spreadsheet) called "Assigned". Is this possible? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to protect and unprotect 30 worksheets in a file every month . | Excel Worksheet Functions | |||
Protect/unprotect all worksheets | Excel Worksheet Functions | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) | |||
Sort/Link Worksheets | Excel Worksheet Functions |