Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Automatically Copy Data from One Group of Cells to Another

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Automatically Copy Data from One Group of Cells to Another

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Automatically Copy Data from One Group of Cells to Another

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:D are filled.

In article ,
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Automatically Copy Data from One Group of Cells to Another

Per the OP's problem statement:

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

In article ,
Gary''s Student wrote:

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

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
Automatically copy previous cells in data entry in Excel Sam Excel Discussion (Misc queries) 1 August 20th 08 10:01 PM
Copy Data from One Group of Cells to Another Group Alan Auerbach Charts and Charting in Excel 2 May 27th 07 04:12 PM
How can I sort a group of numbers automatically as data is entere Adrew Excel Worksheet Functions 4 December 19th 05 12:56 AM
How can i copy a group of cells in a row to a column? yargila Excel Discussion (Misc queries) 2 August 10th 05 03:58 AM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


All times are GMT +1. The time now is 03:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"