Hello,
I'm working in Access VBA trying to manipulate about 50 Excel workbooks. I need code to search a column for any non-blank cell, copy the entire row, create a new worksheet, paste the copied row to it (with headers from first sheet) then delete the row in the first worksheet. I then need it to continue searching the same column for non-blank cells and copy/paste/delete those rows to the new worksheet. Furthermore, it needs to check a second column in the first worksheet for any non-blank cell and do the same thing.
I tried using AutoFilter but I've encountered a problem when trying to count the number of visible rows. (The second worksheet should not be created if no non-blank cells are found in either of the two columns.)
I'm sure this isn't a difficult problem for someone better at Excel VBA than I. (I'm much better with Access VBA.)
Thanks a lot for any help.
I'm working in Access VBA trying to manipulate about 50 Excel workbooks. I need code to search a column for any non-blank cell, copy the entire row, create a new worksheet, paste the copied row to it (with headers from first sheet) then delete the row in the first worksheet. I then need it to continue searching the same column for non-blank cells and copy/paste/delete those rows to the new worksheet. Furthermore, it needs to check a second column in the first worksheet for any non-blank cell and do the same thing.
I tried using AutoFilter but I've encountered a problem when trying to count the number of visible rows. (The second worksheet should not be created if no non-blank cells are found in either of the two columns.)
I'm sure this isn't a difficult problem for someone better at Excel VBA than I. (I'm much better with Access VBA.)
Thanks a lot for any help.