Conditional Delete

odrisso

New Member
Joined
Oct 15, 2014
Messages
11
Hi,

I have the following table:

[TABLE="class: cms_table_cms_table, width: 341"]
<tbody>[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]Ex[/TD]
[TD][/TD]
[TD]'Stage 1'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]Ex[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]Ex[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]Ex[/TD]
[TD][/TD]
[TD]'Stage 3'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
[TR]
[TD]SN[/TD]
[TD][/TD]
[TD]'Stage 2'[/TD]
[/TR]
</tbody>[/TABLE]



Now, I want to delete the texts (Stage 1 , Stage 2 and Stage 3) from 3rd column where there is an Ex. I actually want to delete anything where I encountered with an Ex.

Please let me know the formula behind it.
 
You can do this manually by using the formula as under in additional column:
We consider these columns as "A", "B" and "C". We use column "D" for formula:
D1=IF(A1="Ex","",C1) and copy it to down rows.
Then copy the data of "D" column, paste it as value and delete column "C".
 
Upvote 0

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