PC Review


Reply
Thread Tools Rate Thread

Automatically Copy Data from One Group of Cells to Another

 
 
=?Utf-8?B?QWxhbiBBdWVyYmFjaA==?=
Guest
Posts: n/a
 
      27th May 2007
I have five columns of data on two different sheets in the same workbook. One
set of columns is sorted in ascending date order the other in descending date
order. When I enter data into the last row of Sheet 1, I need the data in
that row in columns A, B, C and D to be copied into Sheet 2 columns A, C, D
and E in a newly inserted row 14. Is this possible with the use of a macro? I
can find the last cell in Sheet 1, but then need to go up one row and back to
column A. I am having difficulty with that.

Thanks is advance for any assistance offered!

/s/ Alan Auerbach

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      27th May 2007
If you want A,B,C,D to go into A,B,C,D,E
what goes into E?
--
Gary''s Student - gsnu200725


"Alan Auerbach" wrote:

> I have five columns of data on two different sheets in the same workbook. One
> set of columns is sorted in ascending date order the other in descending date
> order. When I enter data into the last row of Sheet 1, I need the data in
> that row in columns A, B, C and D to be copied into Sheet 2 columns A, C, D
> and E in a newly inserted row 14. Is this possible with the use of a macro? I
> can find the last cell in Sheet 1, but then need to go up one row and back to
> column A. I am having difficulty with that.
>
> Thanks is advance for any assistance offered!
>
> /s/ Alan Auerbach
>

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      27th May 2007
If I understand you correctly, one way:

Put this in your Sheet1 worksheet code module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rSource As Range
With Target
If Not Intersect(.Cells, Cells(Rows.Count,1).End( _
xlUp).Resize(1, 4)) Is Nothing Then
Set rSource = Cells(.Row, 1).Resize(1, 4)
If Application.CountA(rSource) = 4 Then
With Sheets("Sheet2").Cells(14, 1).EntireRow
.Insert
With .Offset(-1, 0)
.Cells(1).Value = rSource(1).Value
.Cells(3).Resize(1, 3).Value = _
rSource.Offset(0, 1).Resize(1, 3).Value
End With
End With
End If
End If
End With
End Sub

This will insert the values from the last row into sheet2, (inserted)
row 14 when the input row's cells A are filled.

In article <9F020B0E-6391-47D9-859D-(E-Mail Removed)>,
Alan Auerbach <(E-Mail Removed)> wrote:

> I have five columns of data on two different sheets in the same workbook. One
> set of columns is sorted in ascending date order the other in descending date
> order. When I enter data into the last row of Sheet 1, I need the data in
> that row in columns A, B, C and D to be copied into Sheet 2 columns A, C, D
> and E in a newly inserted row 14. Is this possible with the use of a macro? I
> can find the last cell in Sheet 1, but then need to go up one row and back to
> column A. I am having difficulty with that.
>
> Thanks is advance for any assistance offered!
>
> /s/ Alan Auerbach

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      27th May 2007
Per the OP's problem statement:

A -> A
B -> C
C -> D
D -> E

In article <FDE1BBF3-05EC-4044-BB23-(E-Mail Removed)>,
Gary''s Student <(E-Mail Removed)> wrote:

> If you want A,B,C,D to go into A,B,C,D,E
> what goes into E?

 
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
how do I automatically copy cells? Medic Marg Microsoft Excel Worksheet Functions 1 24th May 2008 01:22 PM
how do I automatically copy cells? Medic Marg Microsoft Excel Worksheet Functions 0 24th May 2008 09:52 AM
Copy Data from One Group of Cells to Another Group =?Utf-8?B?QWxhbiBBdWVyYmFjaA==?= Microsoft Excel Charting 2 27th May 2007 04:12 PM
How can i copy a group of cells in a row to a column? =?Utf-8?B?eWFyZ2lsYQ==?= Microsoft Excel Misc 2 10th Aug 2005 03:58 AM
automatically copy into cells markymark Microsoft Excel Programming 7 19th Jul 2005 01:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:07 AM.