Delete Line in Different Sheet Based on Cell Value and IF Statements

jhar123456

New Member
Joined
Oct 17, 2017
Messages
3
I currently have a worksheet which consists of multiple sheets. On sheet "Imp. and Def. Rank Template" I enter in information which is all based on the entry number (Cell "B2") and then have a properly functioning macro which will do 1 of 3 actions depending on IF statements:

1) If the entry is new (Sheet "Imp. and Def. Rank Template" Cell "E2" and "E4" are blank), take the information and post it on sheet "Open Imp. and Def." where appropriate (already coded properly).

2) If the entry is updated (Sheet "Imp. and Def. Rank Template" Cell "E2" is populated but "E4" remains blank), take the information and post it on Sheet "Open Imp. and Def." where appropriate.

3) If the entry is closed (Sheet "Imp. and Def. Rank Template" Cell "E4" is populated), take the information and post it on Sheet "Closed Imp. and Def." where appropriate.

The function that I would like to add is a line to each of my IF statements that says if #2 above is performed, then the original entry (based on the name in Cell "B2") on the same sheet will be deleted. Additionally, if #3 above is performed, I would like the entry (based on the name in Cell "B2") on "Imp. and Def. Rank Template" to be deleted.

Being new to VBA, I would sincerely appreciate any help on this issue. Thank you!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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