deleting every n row

Gokuba

New Member
Joined
Aug 6, 2018
Messages
19
HIya,

How do I tackle such problem. I have a column of data like os:

[TABLE="width: 500"]
<tbody>[TR]
[TD]ZZprod1[/TD]
[/TR]
[TR]
[TD]Tbales[/TD]
[/TR]
[TR]
[TD]long tables[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]*[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]Sbales[/TD]
[/TR]
[TR]
[TD]Short tables[/TD]
[/TR]
[TR]
[TD]43[/TD]
[/TR]
[TR]
[TD]32[/TD]
[/TR]
[TR]
[TD]ZZProduct2[/TD]
[/TR]
</tbody>[/TABLE]
So I basically want to check if between after a cell containing a value including"ZZ" , or rather if values between cell containing a value which contains"ZZ" to the row with the cell containing next "ZZ" value, ranges that start a row below (Tbales,long tables2,2,*,3) contain exactly 4 rows . So, in this case, the code would delete a row with "*", but also exclude specific words like "KILO". a range (of rows) would always start with a text(Tbales) and end a row up of the next text (Sbales).
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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