![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Mar 2002
Posts: 18
|
Hi All! Cool new board!
Not sure if loop function is what i need..... I wish to copy a row (A1:Z1) from sheet1! and paste to row (A1:Z1) sheet2!, then change row Sheet1!A1:Z1's contents (via a series of VLOOKUP's) and paste to Sheet2!A2:Z2, then A3:Z3, A4:Z4, etc......but always copying from the same row in Sheet1. Excuse my inability at communicating my problems! always the case! Cheers! Lucky |
|
|
|
|
|
#2 |
|
Join Date: Mar 2002
Location: Brampton
Posts: 319
|
I think that you did not mean "loop" function. Is not clear how you would like to handle the series of events you described. The initial input in Sheet1 is going to be changed manually changing the content of the cells by formula vlookup? And when are you going to change again this content?
|
|
|
|
|
|
#3 |
|
Join Date: Mar 2002
Posts: 6,680
|
Hi
It sounds like you simply need to link sheet2 to sheet1???? If so, goto sheet2 A:1 Type = Click on the sheet1 tab and click on Cell A:1 Click the little checkmark on your formula bar. Left hand side above col A,B, or C Now right click on sheet2 cell A:1 Choose copy Select(highlight), by dragging mouse, the range of sheet2 A:1 to Z:? Now right click anywhere in the shaded selection and choose paste. Hope this is what you need? Tom |
|
|
|
|
|
#4 |
|
Join Date: Mar 2002
Posts: 372
|
To copy the values in Sheet1 range A1:Z1 to the next available row in Sheet2 :-
Sub Copy_Values Dim rw As Long rw = Sheets("Sheet2").UsedRange.Cells.SpecialCells(xlCellTypeLastCell).Row + 1 Sheets("Sheet2").Cells(rw, 1).Resize(, 26) = Sheets("Sheet1").[A1:Z1].Value End Sub Note : If Sheet2 is blank, the data will be put in row 2. |
|
|
|
|
|
#5 |
|
Join Date: Mar 2002
Posts: 18
|
Thank you C O Jones. that is exactly what I was after.
May the luck be with you. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|