Question:
I have seen this very similar question, and I think the answer by user @SQL Police is great! But I can not figure out how to modify or adapt it to produce the results I am looking for. Here is my (similar, but different) question:I want to delete everything that is NOT in columns 24 – 26, but also not in rows 1 – 6.
I have code that can do each seperately, but not together.
To delete with specified columns:
But how can I do both at once? (The intersection of the two ranges, not the union)
Thanks!
Answer:
Adapt to your requirement, the basic idea is to get the range of both sides thenClearContents
separately:If you have better answer, please add a comment about this, thank you!