theta
02-10-2012, 06:23 AM
Hi all...i have been playing with some code but not close to what I need to acheive.
I have a named range 'HeaderQualifiers' in A1:A10.
This contains items that are to be classed as headers.
I have a file that I want to open "test_file.xls". I need it to go through rows 1 to last row, checking the contents of column A. If the contents current row, column A matches any of the items in 'HeaderQualifier', delete the current row and carry on until last row, then save file.
I was experimenting with Row = 1 to lastrow, Next Row but when you delete the current row, the Next will fail and skip.
If anybody could point me in the right direction is would be greatly appreciated :)
(was comparing each rCell in 'HederQualifier' with current Cells(row,1) but I think there are more elegant solutions and faster solutions)
I have a named range 'HeaderQualifiers' in A1:A10.
This contains items that are to be classed as headers.
I have a file that I want to open "test_file.xls". I need it to go through rows 1 to last row, checking the contents of column A. If the contents current row, column A matches any of the items in 'HeaderQualifier', delete the current row and carry on until last row, then save file.
I was experimenting with Row = 1 to lastrow, Next Row but when you delete the current row, the Next will fail and skip.
If anybody could point me in the right direction is would be greatly appreciated :)
(was comparing each rCell in 'HederQualifier' with current Cells(row,1) but I think there are more elegant solutions and faster solutions)