I have a massive spreadsheet with information occupying columns A thru T and rows 1 thru 465.
I need to copy non-adjacent rows using multiple criteria, e.g. row contains "Frederick" or "Daniel" into a new workbook.
Otherwise, I'll have to do it all manually, which'd take ages.
Thanks for any help,
.DJR
Its been my experience thus far that if you want something specific from within a worksheet that you need to code the specifics. Eg:
Without seeing what you are wanting to do, non-adjacent rows is a little too vague (non-adjacent to what?). Perhaps if you uploaded a mock workbook you will find the help you require.Cells.Find(what:="Frederick")
Please leave a message after the beep!
In this example, I'd want a script that copies the numbers, jobs, and address info for all the painters and carpenters into a new workbook without touching the Boss or manager.
I work with 2003 but check this out to see if it is close to what you want. Run the macro called "copyToSheet2". I had to restructure your sheet a little to do what you want it to do but let me know if I am on the right track here.
Please leave a message after the beep!
That works pretty well (thanks!), but ideally the resulting sheet would have only the rows involved in the macro. i.e. The rows with manager and boss will be blank or only the rows I'm interested are transferred.
I am curious about the restructuring of the first two columns. Why was that necessary?
Thanks again!
DJR
Last edited by DJRockit; 12-16-2010 at 12:39 AM.
Here's a better working example file.
I would like Daniel C's and Mattias A's info transferred to a new sheet without anything else being moved there.
Its just my own habit of having the unique identifiers to compare to in the first column (or row). For me, it makes coding easier to visualize while I'm writing it. I'll look at your workbook throughout today but I have two meetings and a luncheon so I won't be at my desk all day.
Please leave a message after the beep!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks