How To Delete row if a specific values exists (VBA)

toradoya

New Member
Joined
Dec 3, 2016
Messages
14
Good Day,


i will be brief, to not wasting your time.


How To Delete row if a specific values exists by Using VBA Code?


Reason: i have invoice sheet, and Sales sheet , i need a Button for the invoice sheet to delete some sales records if
a specific value exists in the sales sheet, the row in sales sheet will be deleted without wasting my time using the manual way


what the code will do !!:


• The code will First check 3 columns in the invoice sheet the bar-code, Date ,and Quantity,then find the match in sales sheet,
if the three values are matched with one of the sales sheet records , then that record will be deleted.


I attached a sample file for you : here
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
there is a mistake in the sample file, the quantities in sheet 1 supposed to be 1 so the records will be matched with sales records, please adjust the quantities, and dates so they will be matched with sales sheet, i need to make this work

thanks
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

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