Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default 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
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
worksheet code Rod Excel Discussion (Misc queries) 11 January 6th 08 08:53 PM
Worksheet Code Kerry Excel Discussion (Misc queries) 4 December 19th 07 04:01 AM
Need Worksheet Code jacob Excel Worksheet Functions 3 March 17th 06 07:48 PM
worksheet code nowfal Excel Discussion (Misc queries) 1 August 19th 05 08:25 PM
Worksheet Changes and applying code Nigel Bennett Excel Worksheet Functions 1 March 13th 05 06:49 PM


All times are GMT +1. The time now is 03:16 AM.

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"