Create VBA Macro Button to Clear Specific Cells | Multiple Ranges | Keep Formatting | All Sheets

  Рет қаралды 41,192

Chester Tugwell

Chester Tugwell

Күн бұрын

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
------------------------

Пікірлер: 32
@JBERGALIEN
@JBERGALIEN 7 күн бұрын
Excellent video precise & simple to understand straight to the point and no Fuzz, Thank you
@Ty33Budd
@Ty33Budd 2 ай бұрын
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.
@workfolder7743
@workfolder7743 Ай бұрын
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. 🤗
@stevesignorelli2885
@stevesignorelli2885 5 ай бұрын
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!!
@tomstuart5122
@tomstuart5122 5 ай бұрын
Thank you Chester Tugwell! I was struggling with this and you have helped more than you can imagine :)
@ivangarza1500
@ivangarza1500 Жыл бұрын
You learn something new every day. This was very useful!! It’s gonna make my life easier at work.
@IvanCortinas_ES
@IvanCortinas_ES 2 жыл бұрын
Thank you Chester. That's a very useful macro-set.
@alexrosen8762
@alexrosen8762 Жыл бұрын
Very useful! Many examples which can be used in different real life scenarios. Thanks
@JaskC700
@JaskC700 11 ай бұрын
Very Helpful!! Especially the enable macros function.
@yoohootube12
@yoohootube12 Жыл бұрын
Thanks, your vid is really simple, helpful, and easy to understand. Subscribed
@justinagordon5068
@justinagordon5068 Ай бұрын
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?
@lilig9239
@lilig9239 7 ай бұрын
This is excellent. Thank you!
@damuelesington385
@damuelesington385 11 ай бұрын
You are a lifesaver thank you
@garyleskiw181
@garyleskiw181 Жыл бұрын
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)
@dhiandrarhatnanita3564
@dhiandrarhatnanita3564 Жыл бұрын
Thank you!
@sj2411
@sj2411 2 жыл бұрын
Very good
@dhilieebandhatchanamoorthi8944
@dhilieebandhatchanamoorthi8944 29 күн бұрын
Thank you
@hawkeye7856
@hawkeye7856 Жыл бұрын
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
@youngblacklife9419
@youngblacklife9419 Жыл бұрын
yup its great but scary ! even ai is developing and taking over
@kartikforanimal
@kartikforanimal Жыл бұрын
Kindly release a video for clearing data of merged cell
@LeonidasMaximus
@LeonidasMaximus Жыл бұрын
This was great thanks so much.. Is there a way to get the code to recognize merged cells? Thanks
@chelamine
@chelamine 3 ай бұрын
Thank's
@Edward20100
@Edward20100 Жыл бұрын
Thanks sir
@Alhusam
@Alhusam 2 жыл бұрын
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.
@raserex
@raserex Жыл бұрын
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.
@PascoReadyMix
@PascoReadyMix Жыл бұрын
Is there a way to clear merged cells as well?
@matthewbakke1623
@matthewbakke1623 5 ай бұрын
Is there a way to use the "clear all sheets" format to compile / hide all unused rows in multiple worksheets?
@GeekinTX
@GeekinTX 2 жыл бұрын
When you looped through all the worksheets and cleared each one, why didn't the button disappear too?
@aakifahmed8212
@aakifahmed8212 Жыл бұрын
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
@romeodariochiu8137
@romeodariochiu8137 11 ай бұрын
Sir Chester, good day. I wanna ask you why it can't be saved and everytime I open a workbook, s gone. Thank you.
@alparkson5494
@alparkson5494 Жыл бұрын
When I try this, I get a Compile Error - Wrong number of arguments or invalid property assignment 😌
@user-be8qp3gb8l
@user-be8qp3gb8l 7 ай бұрын
Thank you!
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 159 МЛН
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 35 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
Say Goodbye to IF Statements in Excel with SWITCH
7:45
Teacher's Tech
Рет қаралды 462 М.
Automatically Clear Contents of Worksheet without Clearing Formulas
8:53
Dinesh Kumar Takyar
Рет қаралды 46 М.
VBA to Delete all Sheets except Specific Sheet - Excel VBA Tutorial
6:47
Excel Destination
Рет қаралды 16 М.
VBA to BROWSE & COPY Data from SELECTED File in Excel
10:00
Leila Gharani
Рет қаралды 323 М.
3 Essential Excel skills for the data analyst
18:02
Access Analytic
Рет қаралды 1,5 МЛН
VBA Macro to Copy Data from Another Workbook in Excel
13:39
Excel Campus - Jon
Рет қаралды 633 М.
What’s In This Box?
0:51
Clean Girl
Рет қаралды 23 МЛН
Обхитрили маму
0:24
Miroslava Bykova
Рет қаралды 1,2 МЛН
POR QUEEEEE DIVERTIDAMENTE !!! #shorts
0:15
LARISSALADA - LARISSA GOMES
Рет қаралды 10 МЛН