MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Row copy question

Posted by Herman on February 15, 2001 11:31 PM

I am searching in my sheet for a value in column E
when this value is found i have an active cell , Now i want to select in the same row where the value is found the 5 cell's next to the cell found
and copy them to a new workbook.

can anyone help me with this

Posted by Dave Hawley on February 16, 2001 12:10 AM

Hi Herman

Glad to help, but I'm not too sure if you need help with all of what you are trying to do or just the "next 5 cells" bit. If it is only selecting the 5 cells from the selected cell you would probaly use:



OzGrid Business Applications

Posted by Celia on February 16, 2001 12:30 AM

Assuming you mean the 5 cells to the immediate right of the selected cell, I think Dave meant to type :-
Range(Selection.Offset(0, 1), Selection.Offset(0, 5)).Copy
Range("A1").PasteSpecial xlPasteAll

Posted by Herman on February 16, 2001 1:04 AM

Thax a lot , with this help i can make my sheet complete and yes i was only looking for the code for selecting the next 5 cells.

Thank you Celia and Dave

Posted by Dave Hawley on February 16, 2001 1:43 AM

Thanks Celia, that was what I meant. Damn web pages, why can't they be like the VBE enviroment :-)

DaveOzGrid Business Applications