I have some code here which works great. I would like to customize it in a different way though, and have been unsuccessful at doing so and am therefore reaching out to this community. I will try to explain what I would like to do. What the macro does right now: it copies three rows to a new workbook (Rows 4 and 5 as well as the row of the active cell, based on whether the row of the active cell has non-empty cells). What I would like to do is that I would like the macro to copy the following rows to a new workbook:
-Row 4 & 5 (like it's doing right now), but based on whether the below row(s) has(have) non-empty cells.
-any row which i have selected. So instead of just one other row being copied, several other rows should be copied, depending on which rows i select.
To summarize: Assuming I select row 6,8, & 10. When running the macro, a new workbook is created where the following rows have been copied:
-Row 4 & 5
-Row 6,8, & 10 *The condition being however that only those columns are copied where Row 6,8, & 10 are non-empty.
Assuming I select row 14, 54, 31, 64, 65. When running the macro, a new workbook is created where the following rows have been copied:
-Row 4 & 5
-Row 14, 54, 31, 64, 65 *The condition being however that only those columns are copied where Row 14,54,31,64 & 65 are non-empty.
The overall logic of the current code thus doesn't change. Rather, what changes is that I would like to be able to copy several rows apart from 4&5 instead of just one other (as it is doing now-based on where the active cell is)
Here is the code, I hope I have been clear. If anyone has any idea where i could start/how i could do this, please let me know, thanks!!
Links for cross-posts:Please Login or Register to view this content.
http://stackoverflow.com/questions/1...k-based-on-a-c
http://www.ozgrid.com/forum/showthread.php?t=173353
Bookmarks