Macro For Multiple Delete Functions

asivaprakash

New Member
Joined
May 26, 2013
Messages
5
I have worked this below macro and was succesful in one out come but the others are not working

1 Delete 2861 from store
2 Delete DXJ8934\MXA8484\RCF959 from Processor
3 Delete + values(amt) in PLUS (cardtype)

The below code works for Delete 2861 from store.The other two need to be in the same shee and start working once option 1 finishes then option 2 should kick in then option 3.Can any one help
Sub Loop_Delete_Macro()

Dim Counter As Integer
Dim Todelete As String
Dim NoIterations As Integer

'DEFINE VALUE TO DELETE
Todelete = 2861

'DEFINE NUMBER OF ITERATIONS (IE HOW MANY ROWS YOU HAVE IN TOTAL)
NoIterations = 15000

Counter = 0

Do While Counter < NoIterations

If ActiveCell.Value = Todelete Then

Selection.EntireRow.Delete

Else: ActiveCell.Offset(1, 0).Activate

End If
Counter = Counter + 1

Loop

End Sub

https://hotfile.com/dl/224531363/f32ec0c/123.xlsm.html

This is the sample data I have added the comments on it as well.Can any one help
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
asivaprakash,

Welcome to the MrExcel forum.

When I tried to download/open your attached workbook I received a message concerning malicious content.
 
Upvote 0
asivaprakash,

The same thing happened.

Click on the Reply to Thread button, and just put the word BUMP in the post. Then, click on the Post Quick Reply button, and someone else will assist you.
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,299
Members
448,885
Latest member
LokiSonic

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