View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
steve smallman steve smallman is offline
external usenet poster
 
Posts: 15
Default CopyIntoFirstEmptyRow

Mike, the following code is untested

private sub Mikes_copy()
Sheets("A").activate
Range("b1:b20").select
selection.copy
Sheets("B").activate
Range("A2").select
do until activecell.value="" then
activecell.offset(1,0).select
loop
activecell.pastespecial transpose:=true
end sub

The logic here is :
Activate Sheet A
Select the range
Copy the range
Activate Sheet B
Goto A2
Find a blank cell
use paste special to transpose the range

Steve


-----Original Message-----
I hope someone can help.
I need to write a macro to do the following:
I have worksheet A, which I want to copy the values of

Cells B1:B20
The macro will search worksheet B for the first empty

row starting with
row A2.
Then copy worksheet A, cells b1:b20 into worksheet B

HORIZONTALLY in cells
A2:T2
The next times the macro is activated, it will again

copy cells b1:b20 from worksheet a,
find the next empty row in worksheet B and then copy.
thanks

Mike



.