create Button to Delete Rows, Please Help

paata01

New Member
Joined
May 10, 2014
Messages
21
Hello everyone,
can you please help me. I want to create Macro in VBA that will delete specific rows in excel. this is what I want to do
I am working on t-shirts excel file, I want to have two options there "MEN" and "Women", when I click men it should delete all woman rows. I have know specific rows which should be deleted. How can I do something like this? from filter it takes a lot of time to delete manually.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Well, since you're doing 'Save AS'
Then the original data is still there.

So maybe do a normal save BEFORE deleting rows.
Then delete the rows and SaveAs CSV.

If you have to undo, you can copy from the original back into the CSV.
 
Upvote 0
Thanks for help, what about EXCEL UNDO BUTTON. when I delete rows manually, I can click undo and go back. can userform do something like this. I have a lot of data and once its modified I can't copy from orginal CSV.
 
Upvote 0
ok, if not possible. I will create worksheets with two sets of data, its easier I think.
Thank you
 
Upvote 0
You're welcome.

Yep, that's the only thing you can really do.
Keep a copy of the original and restore from the copy if you need to undo.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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