Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
This is almost what I need but can anyone help please. I need for it to COPY
"Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
What is "this"? -- Don Guillett Microsoft MVP Excel SalesAid Software "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
What you say sounds like you intended to include your code, but there was no
code in your post. You say to copy Columns A:C when something is added. Added where? Do you mean that when something is added in some row that you want that row, Columns A:C, copied? Do you want this to happen when anything is added to any of the 3 columns? Where in Sheet1 do you want the copy placed? And this would have to be VBA (module). HTH Otto "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
Sorry forgot to post
Sub CopyDups() Dim rColAOne As Range Dim rColATwo As Range Dim Dest As Range Dim i As Range Sheets("Sent to Assembly").Select Set rColAOne = Range("A3", Range("A" & Rows.Count).End(xlUp)) With Sheets("Sheet1") Set rColATwo = .Range("A3", .Range("A" & Rows.Count).End(xlUp)) End With Set Dest = Sheets("Sheet1").Range("A3") For Each i In rColAOne i.Copy Dest Set Dest = Dest.Offset(1) Next i End Sub "Don Guillett" wrote: What is "this"? -- Don Guillett Microsoft MVP Excel SalesAid Software "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
I think you originally wrote this
Sub CopyDups() Dim rColAOne As Range Dim rColATwo As Range Dim Dest As Range Dim i As Range Sheets("Sent to Assembly").Select Set rColAOne = Range("A3", Range("A" & Rows.Count).End(xlUp)) With Sheets("Sheet1") Set rColATwo = .Range("A3", .Range("A" & Rows.Count).End(xlUp)) End With Set Dest = Sheets("Sheet1").Range("A3") For Each i In rColAOne i.Copy Dest Set Dest = Dest.Offset(1) Next i End Sub "Otto Moehrbach" wrote: What you say sounds like you intended to include your code, but there was no code in your post. You say to copy Columns A:C when something is added. Added where? Do you mean that when something is added in some row that you want that row, Columns A:C, copied? Do you want this to happen when anything is added to any of the 3 columns? Where in Sheet1 do you want the copy placed? And this would have to be VBA (module). HTH Otto "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
Still not quite sure what you want but put this in a sheet module and modify
to suit. As written, if you fill out b,c, & d and then enter something in col a the row will be copied to sheet 1 next available row. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub With Sheets("sheet1") lr = .Cells(Rows.Count, "a").End(xlUp).Row + 1 Target.Resize(1, 4).Copy .Cells(lr, 1) End With End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Richard" wrote in message ... Sorry forgot to post Sub CopyDups() Dim rColAOne As Range Dim rColATwo As Range Dim Dest As Range Dim i As Range Sheets("Sent to Assembly").Select Set rColAOne = Range("A3", Range("A" & Rows.Count).End(xlUp)) With Sheets("Sheet1") Set rColATwo = .Range("A3", .Range("A" & Rows.Count).End(xlUp)) End With Set Dest = Sheets("Sheet1").Range("A3") For Each i In rColAOne i.Copy Dest Set Dest = Dest.Offset(1) Next i End Sub "Don Guillett" wrote: What is "this"? -- Don Guillett Microsoft MVP Excel SalesAid Software "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with worksheet code
Richard
Read the questions I asked in my earlier post in this same thread and provide your answers. What you want is easy to do if I know what you want. HTH Otto "Richard" wrote in message ... I think you originally wrote this Sub CopyDups() Dim rColAOne As Range Dim rColATwo As Range Dim Dest As Range Dim i As Range Sheets("Sent to Assembly").Select Set rColAOne = Range("A3", Range("A" & Rows.Count).End(xlUp)) With Sheets("Sheet1") Set rColATwo = .Range("A3", .Range("A" & Rows.Count).End(xlUp)) End With Set Dest = Sheets("Sheet1").Range("A3") For Each i In rColAOne i.Copy Dest Set Dest = Dest.Offset(1) Next i End Sub "Otto Moehrbach" wrote: What you say sounds like you intended to include your code, but there was no code in your post. You say to copy Columns A:C when something is added. Added where? Do you mean that when something is added in some row that you want that row, Columns A:C, copied? Do you want this to happen when anything is added to any of the 3 columns? Where in Sheet1 do you want the copy placed? And this would have to be VBA (module). HTH Otto "Richard" wrote in message ... This is almost what I need but can anyone help please. I need for it to COPY "Sent to Assembly" sheet each time something is added(Columns A, B, C and sent to Sheet1. Right now it only copies Column A. Also should this go in a Module or a worksheet function? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheet code | Excel Discussion (Misc queries) | |||
Worksheet Code | Excel Discussion (Misc queries) | |||
Need Worksheet Code | Excel Worksheet Functions | |||
worksheet code | Excel Discussion (Misc queries) | |||
Worksheet Changes and applying code | Excel Worksheet Functions |