• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to clear all data EXCEPT columns X, Y & Z AND rows A,B,C?

Resolved: How to clear all data EXCEPT columns X, Y & Z AND rows A,B,C?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

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:
To delete with specified rows:

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 then ClearContents separately:

If you have better answer, please add a comment about this, thank you!

excel vba
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How do I stop the command from happening if the requirements for it to work aren’t sert Discord.js

02/04/2023

Resolved: How to scroll bottom of div at launch?

02/04/2023

Resolved: how to get and read an xml file in a zip file using xml.etree

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.