Delete multiple unknown lines after condition is met

nirosro

New Member
Joined
May 10, 2017
Messages
6
Hello!
Could anybody please help me with the following problem:

I need to delete a few unknown number of lines with the following conditions:
-first row to be deleted has the condition on column F.
-all rows between that line and the next line were condition is met on row G

Below is an example where i want to delete all the rows between row 1 to row 4 inclusive and also row 12-17.
the condition to start the selection is that condition = VG - Bon Fiscal Vanzare and the condition to stop is the first total encountered after the starting condition.

This program is meant to delete a lot of unnecessary lines in a 70k line excel.

Thanks a lot!!!!!!

9k=
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I'm sorry and I apologies for the stupid thing that i made.
Please see below part of the excel that I was talking about

Excel 2007
ABCDEFGHIJK
1abcdeVG - Bon Fiscal Vanzaregh
2ijk
3ijk
4Total:k
5abcdefgh
6ijk
7ijk
8Total:k
9abcdefghijk
10ijk
11Total:k
12abcdeVG - Bon Fiscal Vanzaregh
13i1j1k1
14i1j1k1
15i1j1k1
16i1j1k1
17Total:k1
Sheet2
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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