Delete rows if a group does not contain a colored cell

farmerjack190

New Member
Joined
May 17, 2016
Messages
11
I have a sheet which we use to aid a our warehouse movements when new stock arrives (ZFLOOR) location. What I am needing to do is to have a script that can remove a block of items if "ZFLOOR" is not contained.
In this example I need to remove rows 7-10, 12-13, 15-16 and preferably the blank row below to keep formatting etc but need to keep data in rows 21-22 in this case. Obviously "ZFLOOR" will change each time but always in Column P so rows to be deleted will be subject to a group not containing ZFLOOR or a Green conditional formatted cell.

Have no idea where to start, any help appreciated.
 

Attachments

  • 2021-11-22.png
    2021-11-22.png
    44.2 KB · Views: 10

farmerjack190

New Member
Joined
May 17, 2016
Messages
11
That is brilliant, thank you so much. Saves me deleting everything manually.
So thankful (y)?
Have yourself a great day.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
3,984
Office Version
  1. 365
Platform
  1. Windows
You're welcome, glad to help & thanks for the feedback.:)
 

Forum statistics

Threads
1,176,504
Messages
5,903,431
Members
435,029
Latest member
excelvbanoob420

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
Top