MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macro for coping a range of cells?


Posted by Marianne on January 15, 2001 10:01 PM

Hello,

I want to create a macro for copying information from one worksheet to another. However, even though the same information is being copied, the columns are in different order on each sheet. Thus, I created columns (in the same order as worksheet 2) to the right of the copying columns with calulations such as "+a1","+b1","+c1"... This way, the information would be in the right column order.

Now for the problem. Since the number of rows that I will be copying is not constantly the same (sometimes 1, sometimes up to 100 rows) I would like to use a command such as shift-end. Only when I do that it copies from 1 to 100 rows because with the +a1 calculation, there is always something in the cell. Is there anyway to have it recognize the cell as blank and stop at the point where there is no longer text in the cell?

Thanks,

Marianne


Posted by Marianne on January 16, 2001 11:47 PM

Yippee! I came up with a solution.