ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy from Column to Column (https://www.excelbanter.com/excel-programming/286814-copy-column-column.html)

mike

Copy from Column to Column
 
I need help in copying data from column to column
I going to give an example.
Example, Worksheet 1, cell A1= bob, cell A2 = mike, cell A3= jim
I want the macro to goto Worksheet 2 and find the first column where the cells a1 through a3 are empty; the cells below a3 may have data in them

Then I want the macro to copy the contents of Worksheet1, a1:a3 into the empty cells (A1:A3) in the first selected empty column in Worksheet 2

The next time I use the macro, there is different data in worksheet 1, in cells a1:a3. The macro will then copy these new string values into the next empty column in worksheet 2

I appreciate any help someone can offer
Mike


Tom Ogilvy

Copy from Column to Column
 
This sounds awful familiar - did you post this before.

for each cell in Worksheets("Sheet2").Range("A1:IV1")
if application.countA(cell.Resize(3,1)) = 0 then
cell.Resize(3,1).Value = Worksheets("Sheet1").Range("A1:A3").Value
exit for
end if
Next

--
Regards,
Tom Ogilvy


mike wrote in message
...
I need help in copying data from column to column.
I going to give an example.
Example, Worksheet 1, cell A1= bob, cell A2 = mike, cell A3= jim.
I want the macro to goto Worksheet 2 and find the first column where the

cells a1 through a3 are empty; the cells below a3 may have data in them.

Then I want the macro to copy the contents of Worksheet1, a1:a3 into the

empty cells (A1:A3) in the first selected empty column in Worksheet 2.

The next time I use the macro, there is different data in worksheet 1, in

cells a1:a3. The macro will then copy these new string values into the next
empty column in worksheet 2.

I appreciate any help someone can offer.
Mike




TOM

Copy from Column to Column
 
Yes Tom, I had asked for help with this before and could not get the program subroutine to work.
What you sent to me now works perfectly, just wanted to thank you.

Could you suggest a reference book that would explain how and why to use such
functions as "resize", "destination","xlup" and so forth. My reference manuals
do not show these functions.

thanks
Mike

mike

Copy from Column to Column
 
Tom
Thanks for your help.
Mike


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com