VBA - Extend deletion across all sheets

The Power Loon

New Member
Joined
Feb 7, 2020
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I have a document with 37 sheets. Each sheet has a table with an identical list of thousands of products in column A, with different metrics associated to the products in columns B through G on each sheet.

I'm not sure if this is even possible, but what I want to have happen is:
- Delete any rows in the last sheet with a value lower than $25,000 in Column G.
- Then, any product that was deleted in this sheet would then be deleted in all the other sheets, regardless of column G value.

I imagine an index of some type might be the best bet, but I couldn't figure it out. Any idea how this can be done?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Wow! 37 sheets!

It sounds like what you have is a relational database (data on all the pages related to each other).
As such, Excel is not the best tool to do for this sort of thing (as you are discovery how clunky and difficult this can be).
It would be much better to do this in a relational database program, like Microsoft Access or SQL.
Then you just have you main data sheet, and most of your other 37 queries are really just queries off of that main data set.
So, as you make edits to the data in the main data set, the data is automatically (dynamically) updated in all the queries without you having to do anything special to it.

Excel was not designed to be a relational database, so trying to perform relational database operations in it can be quite cumbersome (like trying to use a wrench to drive nails - it can usually be done, but if is much more difficult than if you used the right tool).
If you have no option than to use Excel, you may want to look at using Power Query in Excel, which allows you to do relational database type operations in Excel.
There is a whole help forum for all the Power Tools of Excel here: Power Tools
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top