PC Review


Reply
Thread Tools Rate Thread

Copying specific data from Sheet 1 to Sheet 2

 
 
Jock
Guest
Posts: n/a
 
      27th Oct 2008
In Sheet 1, when "CH" is selected from a drop down list in column M, I'd like
Excel to copy data from cells B-L from the same line and paste the values
(not formats or formulae) into the next available row in Sheet 2.
Can this be done?
--
Traa Dy Liooar

Jock
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      28th Oct 2008
Hi

Sure, it can be done.

Its' an event code, so it has to go into the codesheet for sheet1. I Assume
you have headings in row 1. Change the CopyToCol as desired.

Private Sub Worksheet_Change(ByVal Target As Range)
CopyToCol = "A"
Set isect = Intersect(Target, Columns("M"))
If Not isect Is Nothing Then
If Target.Value = "CH" Then
Range("B" & Target.Row, Cells(Target.Row, "L")).Copy
TargetRow = Worksheets("Sheet2").Range(CopyToCol & "1"). _
End(xlDown).Offset(1, 0).Row
Sheets("Sheet2").Range(CopyToCol & TargetRow). _
PasteSpecial Paste:=xlPasteValues
End If
End If
End Sub

Regards,
Per

"Jock" wrote:

> In Sheet 1, when "CH" is selected from a drop down list in column M, I'd like
> Excel to copy data from cells B-L from the same line and paste the values
> (not formats or formulae) into the next available row in Sheet 2.
> Can this be done?
> --
> Traa Dy Liooar
>
> Jock

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Microsoft Excel Worksheet Functions 1 25th Nov 2009 11:54 PM
How to Automatically transfer specific Data from Sheet 1 to Sheet =?Utf-8?B?Sm1hbg==?= Microsoft Excel Worksheet Functions 12 10th May 2007 05:35 AM
Copying data from one sheet to another on a specific date =?Utf-8?B?R2F2MTIz?= Microsoft Excel Programming 3 5th May 2007 12:33 PM
Copying Data from one sheet to another sheet on a specific day =?Utf-8?B?R2F2MTIz?= Microsoft Excel Worksheet Functions 0 1st May 2007 10:17 AM
2 questions, copying data from sheet to sheet and assigning macro =?Utf-8?B?Qm9yaXM=?= Microsoft Excel Worksheet Functions 0 16th Dec 2004 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:35 AM.