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: 12

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
You're welcome, glad to help & thanks for the feedback.:)
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,306
Members
449,079
Latest member
juggernaut24

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