Hi,
@stnkynts
Fair point and I accept that if the OP meant (and re-reading his original I think you're correct) that the column contained all sorts of labels and blanks and only blanks should be deleted then as stated it would delete all apart from Company Code. In which case the filter line might have been better as
but having seen John's remark about 'contains' he's reminded me of something that I have a vague recollection of reading before, so from me too - thanks John.
As for working with and editing code that's given: It's a moot point. I agree that should be the default position but when I see code that is badly written or redundant, or where there are lots of .Selects .Activates and other stuff that is clearly from the macro recorder I believe it's important to not only indicate there are more efficient ways but also show how. The looping thing to determine whether to process a particular row is a particular bete noir of mine and something that impressed me very early on when I was in the corporate world and handled some large tables. I used to waste a lot of time waiting for macros to complete until someone mentioned the filtering method which enables whole chunks of data to be processed immediately. My life was transformed and I've never forgotten it. If we were ever asked for a top tip that would be high on my list.
Bookmarks