Create VBA Macro Button to Clear Specific Cells | Multiple Ranges | Keep Formatting | All Sheets
HTML-код
- Опубликовано: 8 июл 2024
- Download the featured file: www.bluepecantraining.com/wp-...
In this video I show you how to write VBA macros to clear specific cells. These macros can be run via a button on your worksheet.
Table of Contents:
00:00 - Introduction
01:13 - Clear a specific cell with a VBA macro button
03:54 - Clear a specific range of cells with a VBA macro button
05:20 - Clear multiple ranges with a VBA macro button
06:55 - Clear selected cells with a VBA macro button
07:46 - Clear specific cells on another worksheet with a VBA macro button
09:18 - Clear all worksheets with a VBA macro button
------------------------ Хобби
Chester, if you have for example 5 worksheets in a workbook. On each sheet you've created a clear button for that sheet. Can you have a master sheet that reference to active each of those macros? With the example you have here, it clears all the data from the sheets, even the data i want to keep, thanks in advance.
Amazing! Thank you, you made this video very easy to follow and understand. You also showed various examples that are very practical in the real world. 🤗
I've been struggling with a special workbook that I fill in throughout the year and keep re-using, now I have an easier way to clear each sheet :) Thank you!!
You learn something new every day. This was very useful!! It’s gonna make my life easier at work.
Very useful! Many examples which can be used in different real life scenarios. Thanks
Thank you Chester. That's a very useful macro-set.
Thank you Chester Tugwell! I was struggling with this and you have helped more than you can imagine :)
Very Helpful!! Especially the enable macros function.
Thanks, your vid is really simple, helpful, and easy to understand. Subscribed
This is excellent. Thank you!
You are a lifesaver thank you
Thank you!
Thank you
Very good
Thanks sir
loving 2022, you wake up you have a question , you ask youtube and get the answer in a 11 min summary with visual aid ... my friends we are in the matrix
yup its great but scary ! even ai is developing and taking over
Very clear, and allowed me to clear multiple and disparate entry cells in a sheet by using a named range (perhaps add named range as an example). However, I could not get it to work when some of the entry cells were merged cells. Looking for this solution as my sheet is an entry form where different width fields are used on each row (so changing column width to avoid merging is not a great option)
Excellent! You are so easy to follow! Do you have a video that shows the code that will not clear formulas. What about clear all unlocked cells?
Thank's
This was great thanks so much.. Is there a way to get the code to recognize merged cells? Thanks
Kindly release a video for clearing data of merged cell
Thanks Chester. By the way, did you know that you don't have to type the parentheses after typing the title of the subroutine because the VBA editor will take care of that.
Thanks for this! Now I''m trying to clear a range of cells. So, I've done this and I'm actually clearing a column of data. The data leaves the cells in the row, but I've also got a duplicate conditional format in that column. When I clear the data, the cells turn pink, almost as if the "no data" cells are duplicated. Then, when I manually highlight those cells and press the "delete" key, the cells return to white as normal. When I check the cells then, they still have the duplicate rule on them. I can't figure out why that row is turning pink and furthermore how to correct this. Here is the code I've set to hopefully return that column to no fill. Range("A4:A39").Interior.ColorIndex = xlNone Can you help? FYI, My sheet would most resemble the Non-consecutive cells portion of this tutorial.
Is there a way to clear merged cells as well?
Is there a way to use the "clear all sheets" format to compile / hide all unused rows in multiple worksheets?
Hi i have a doubt
Can we have a button which can Clear all the contents of the multiple sheets present in the same workbook
If yes
Can help me with the VBA code
When you looped through all the worksheets and cleared each one, why didn't the button disappear too?
Sir Chester, good day. I wanna ask you why it can't be saved and everytime I open a workbook, s gone. Thank you.
When I try this, I get a Compile Error - Wrong number of arguments or invalid property assignment 😌
Thank you!