Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default MACRO: Selecting "Cancel" from a drop down to copy and paste entirerow to another sheet

I am trying to create a macro for a project management sheet in
excel. I have a column that has a drop down validation; when "Cancel"
is selected, I would like the entire row to be moved to "Sheet2" in
the workbook. I want this to work for all of the projects (each
listed on a different row). I do not have that much experience with
macros, so detailed instructions will be grately appreciated :)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default MACRO: Selecting "Cancel" from a drop down to copy and paste entir

Here is how I would go about it... You need a way to determine if Cancel was
choosen in the specific cells where doing so requires a copy operation. To
that end I would create locally defined named ranges on the cells (on each
sheet) where your validation exists (I used the word This as my names
ranges). At that point can you can use sheet change code in ThisWorkbook do
determine that the change requires a copy with code similar to this...

(Right click the XL icon in the upper left cornter of the XL window and
select View Code. Paste the Following)

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Sh.Range("This"), Target) Is Nothing And _
Target.Value = "Cancel" Then
Target.EntireColumn.Copy Destination:=Sheets("Sheet2").Range("A1")
End If
End Sub

There is more to the code than this but it is a start...
--
HTH...

Jim Thomlinson


"Nicole Hannington" wrote:

I am trying to create a macro for a project management sheet in
excel. I have a column that has a drop down validation; when "Cancel"
is selected, I would like the entire row to be moved to "Sheet2" in
the workbook. I want this to work for all of the projects (each
listed on a different row). I do not have that much experience with
macros, so detailed instructions will be grately appreciated :)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[newbie] Macro for "copy and paste" Jon Excel Discussion (Misc queries) 1 April 2nd 09 10:36 AM
How do I cancel the "Send this Sheet" option? John @ Spray Excel Discussion (Misc queries) 1 January 31st 07 07:35 PM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Macro to find copy "header" and paste RunsWithKnives Excel Discussion (Misc queries) 3 March 27th 06 05:55 AM
Auto "copy and paste" individual cells from various sheets into one sheet ?? [email protected] Excel Discussion (Misc queries) 2 March 1st 06 03:19 AM


All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"