Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2005

Tip: Looking for answers? Try searching our database.

moving a row between worksheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amit - 25 Jan 2005 23:39 GMT
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!
galimi - 26 Jan 2005 01:45 GMT
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

> 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!
Amit - 26 Jan 2005 14:25 GMT
This is awesome,  thanks Galimi!

> Amit,
>
[quoted text clipped - 20 lines]
> > is changed to "John" that entire row is moved to a worksheet (in the same
> > spreadsheet) called "Assigned". Is this possible? Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.