Remove String Line If Contains Specific Word

Tvynn

New Member
Joined
Oct 18, 2018
Messages
10
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>Hi, would like to seek your kind help to remove those original statements that contain "/ERCT" as below:



Case1 Case2 Original Statement Desired Result

1 1 B@gmail.com/ERCT(Renu/20Oct18)<wbr>; A@gmail.com/CRS(Amy/30Oct18)[FONT=&quot];[/FONT]
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
B@gmail.com



1 A@gmail.com/(Amy/30Oct18);
A@gmail.com/(Amy/30Oct18)[FONT=&quot];[/FONT]
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
A@gmail.com/ERCT(Renu/20Oct18)
B@gmail.com
B@gmail.com




1 Z@gmail.com/CRS(Amy/30Oct18);
Z@gmail.com/CRS(Amy/30Oct18)[FONT=&quot];[/FONT]
Z@gmail.om/reinstate(Amy/<wbr>30Oct18);
Z@gmail.com/reinstate(Amy/<wbr>30Oct18)[FONT=&quot];[/FONT]
B@gmail.com/(Renu/23Oct18);
B@gmail.com/(Renu/23Oct18)[FONT=&quot];[/FONT]
/ERCT(Renu/23Oct18);
A@gmail.com/(Renu/23Oct18)[FONT=&quot];[/FONT]
A@gmail.com/(Renu/23Oct18);
Z@gmail.com/ERCT(Renu/23Oct18)


A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/CRS(Amy/30Oct18)[FONT=&quot];[/FONT]
A@gmail.com/(Daphne/20Oct18)
A@gmail.com/(Daphne/20Oct18)
/ERCT(Renu/20Oct18)
[FONT=&quot]/ERCT(Renu/20Oct18)[/FONT]
B@gmail.com
B@gmail.com


Note:
1.
[FONT=&quot]Either Case1 or Case2 is not blank, remove entire statement that contain "ERCT" (remove the blank break line if any)
[/FONT]2. Both Case1 or Case2 are blank (last situation), keep existing statement, including entire statement that contain "ERCT"
3. All statements of each situation listed above are in a same cell instead of different cells

Appreciate your kind help! Many thanks!





 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Do you need formula/VBA?

Can easily be done with excels built in Find/Replace
 
Upvote 0
Hi, would like to seek your kind help to remove those original statements that contain "/ERCT" as below:

Case1Case2original statementkeep only not "/ERCT" after formulaExplanation
11B@gmail.com/ERCT(Renu/20Oct18)<wbr>;
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
Either Case1 or Case2 is not blank, remove entire statement that contain "/ERCT"
1 A@gmail.com/(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18);
A@gmail.com/ERCT(Renu/20Oct18);
B@gmail.com
A@gmail.com/(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18);
B@gmail.com
Either Case1 or Case2 is not blank, remove entire statement that contain "/ERCT" (remove the blank break line of 1 ERCT if possible)
1Z@gmail.com/CRS(Amy/30Oct18);
Z@gmail.com/reinstate(Amy/<wbr>30Oct18);
B@gmail.com/(Renu/23Oct18);
/ERCT(Renu/23Oct18);
A@gmail.com/(Renu/23Oct18);
Z@gmail.com/ERCT(Renu/23Oct18);
Z@gmail.com/CRS(Amy/30Oct18);
Z@gmail.com/reinstate(Amy/<wbr>30Oct18);
B@gmail.com/(Renu/23Oct18);
A@gmail.com/(Renu/23Oct18);
Either Case1 or Case2 is not blank, remove entire statement that contain "/ERCT" (remove the blank break line of 2 ERCT if possible)
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/(Daphne/20Oct18)
/ERCT(Renu/20Oct18);
B@gmail.com
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/(Daphne/20Oct18)
/ERCT(Renu/20Oct18)
B@gmail.com
Both Case1 or Case2 are blank, keep existing statement, including entire statement that contain "/ERCT"

<tbody>
</tbody>

* Note: All statements of each situation listed above are in a same cell instead of different cellsKindly ignore previous message. Appreciate your kind help! Many thanks!



<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 
Upvote 0
Hi Jumbo, yes can try also, but if formula can do it then would also be good, thanks!


Case1Case2original statementkeep only not "ERCT" after formulaExplanation
11B@gmail.com/ERCT(Renu/20Oct18)<wbr>;
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
Either Case1 or Case2 is not blank, remove entire statement that contain "ERCT"
1 A@gmail.com/(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
A@gmail.com/ERCT(Renu/20Oct18)
B@gmail.com
A@gmail.com/(Amy/30Oct18);
A@gmail.com/reinstate(Daphne/<wbr>20Oct18)
B@gmail.com
Either Case1 or Case2 is not blank, remove entire statement that contain "ERCT" (remove the blank break line of 1 ERCT if possible)
1Z@gmail.com/CRS(Amy/30Oct18);
Z@gmail.com/reinstate(Amy/<wbr>30Oct18);
B@gmail.com/(Renu/23Oct18);
/ERCT(Renu/23Oct18);
A@gmail.com/(Renu/23Oct18);
Z@gmail.com/ERCT(Renu/23Oct18)
Z@gmail.com/CRS(Amy/30Oct18);
Z@gmail.com/reinstate(Amy/<wbr>30Oct18);
B@gmail.com/(Renu/23Oct18);
A@gmail.com/(Renu/23Oct18);
Either Case1 or Case2 is not blank, remove entire statement that contain "ERCT" (remove the blank break line of 2 ERCT if possible)
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/(Daphne/20Oct18)
/ERCT(Renu/20Oct18)
B@gmail.com
A@gmail.com/CRS(Amy/30Oct18);
A@gmail.com/(Daphne/20Oct18)
/ERCT(Renu/20Oct18)
B@gmail.com
Both Case1 or Case2 are blank, keep existing statement, including entire statement that contain "ERCT"

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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