Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm trying to copy/special paste a range of information to the first
available row on another sheet called 'Half Payout' or sheet2. When the user chooses "yes" in any row in column L, the data from columns B:K in that same row should get special pasted (value only) to the first open row on sheet2. It doesn't work - the range gets copied and nothing gets special pasted. Here's my code: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False On Error GoTo Whoops If Target.Column = 12 Then 'column L Half Credit If Target.Row 5 Then Dim rw As Integer rw = Target.Row Dim halfRange As String halfRange = "B" & rw & ":K" & rw If Target.Value = "yes" Then Range(halfRange).Select 'this grabs the half credit policy Selection.Copy Sheet2.Range("B3:B8000").Find(What:="", After:=Range("B3:B8000").Cells(1), LookIn:=xlFormulas, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Select Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, skipblanks:=False, Transpose:=False Application.CutCopyMode = False 'Clears clipboard. End If End If End If Whoops: Application.EnableEvents = True End Sub Thanks for any direction. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Copy, paste without file name referenced after paste | Excel Discussion (Misc queries) | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) |