Delete Projects rows where Root is closed

raheem

New Member
Joined
Apr 24, 2017
Messages
38
I have a long list of projects where each project root has multiple subprojects. How can I delete all those projects where complete status is Closed, skipping those projects where Root is still open irrespective of subprojects?

In the image, Project B and D need to be deleted only.


1719082680431.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
One way is to use a helper column D to determine whether the row should be deleted. Apply filter on TRUE, select those rows and delete.
Book1
ABCD
1ItemProjectStatusTo Delete
2RootAOpenFALSE
3A1OpenFALSE
4A2OpenFALSE
5A3ClosedFALSE
6A4ClosedFALSE
7RootBClosedTRUE
8B1ClosedTRUE
9B1ClosedTRUE
10B1ClosedTRUE
Sheet5
Cell Formulas
RangeFormula
D2:D10D2=LOOKUP(2,1/($A$2:A2<>""),$C$2:C2)="Closed"
 
Upvote 0
Solution
One way is to use a helper column D to determine whether the row should be deleted. Apply filter on TRUE, select those rows and delete.
Book1
ABCD
1ItemProjectStatusTo Delete
2RootAOpenFALSE
3A1OpenFALSE
4A2OpenFALSE
5A3ClosedFALSE
6A4ClosedFALSE
7RootBClosedTRUE
8B1ClosedTRUE
9B1ClosedTRUE
10B1ClosedTRUE
Sheet5
Cell Formulas
RangeFormula
D2:D10D2=LOOKUP(2,1/($A$2:A2<>""),$C$2:C2)="Closed"

Thank you very much. This solved the issue.
 
Upvote 0
It checks the last non-blank row in A as you drag down and returns the corresponding status in C. Essentially, it fills down the status of the Root and if it's "Closed" then returns TRUE.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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