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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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
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.
Thank you very much
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,165
Members
451,750
Latest member
dofrancis

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