How To Apply A Button To Clear Specific Cells In Excel

preview_player
Показать описание
How To Apply A Button To Clear Specific Cells In Excel?

Need to work on the same workbook again and again? If so, you must be deleting specific cells to update your data. Then why don’t you create a button to clear specific cells in a workbook? This is what I am going to do today. A simple “Clear Cell” button for you.

This one is advanced excel tutorial and we are going to use Excel VBA for this project. Again, I am using Microsoft excel 2010 for the demonstration. Let’s get started.

Step 1: Create A button by Clicking “Insert” and Then “Shapes”.

Step 2: Add text on the button as button name. You can write “Clear” As button name

Step 3: Add Excel VBA by clicking “Developer” and “Visual Basic”.

Step 4: Now from the new window. Click “insert” and then click “Module”

Step 6: You need to assign Macro to the button you created. Right click on the button and click “Assign Macro”

Step 7: Click on “Clear” and click “Ok”. (You need to select the button name here. Mine is “clear” so I clicked on that)

Done

This is how you create button to clear specific cells in excel. Hope you like it.

#excel10tutorial #clearbutton

Thanks for watching.

-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------

If you like this tutorial, please subscribe:

Checkout our Advance Excel Tutorial Playlist:

Checkout the Excel Case playlist:

Connect us on social media

Рекомендации по теме
Комментарии
Автор

Your tutorials are so good! I had been struggling to follow other online tutorials but yours are so easy to follow. Thank you very much for doing what you are doing and sharing your knowledge.

leighfoster
Автор

Thank you so much for this.
Now my work has become more faster to clear the data.
Thanks a bunch

mohammedameerahmed
Автор

Is there any way to get it to clear the cells without clearing formatting (ie. lines, shading, etc.)?

dawnmeeker
Автор

You did not need to name all those ranges. You could simply write Range("b2:f7"). Clear that is all

frankie
Автор

Thank you for this great video. I've been struggling to figure out how to do the last part. The internet isn't helpful. 👍🏻

ML-cyfi
Автор

Thank you. You provide easy to understand instructions, and I appreciate it.
I've not asked anyone online yet, but I have a question- If possible, how does one create a button to copy a range of cells if certain conditions are met?
Example-
If d6 is empty, copy a11:a17
If d6 contains text, copy b11:17
If d4 contains text but d6 doesn't, copy a11:a17 and c11:c12
If d4 and d6 contains text, copy b11:b17 and c11:c12

veenavilkus
Автор

Thank you so much! I want to learn how to enable another cell in the same sheet or another sheet (in the same Workbook) appear the same data of the data that we enter in first cell. Thank you!

CCAFO
Автор

Is there a chance that i could clear only the number of the cells without losing the commands like vlookup/ifblank etc and the cell color

zpwcxpd
Автор

Great video. What if you only want to clear the content of cells within the range without changing the format of the cells?

holgerrode
Автор

Great video. Is there codes possible to copy the whole sheet to another tab with the current date as the name for the copied tab and clear contents from the present sheet from the particular cells

smcs
Автор

This is perfect. I am trying to do EXACTLY this but in Google sheets.

beatweezl
Автор

How can I make it so that it gets automatically clear at midnight for fresh data to be inputted next day?

reservefolder
Автор

Hi! Love this tutorial! It was very easy to follow but I have another issue. I have the cells I want to clear color coded. So when I click CLEAR button, it also delete the box color and border. How can I keep my color and border and also use the clear button function?? Thanks!!

dominiquejackson
Автор

Great tutorial! One question I have is if there is any way to delete an entire row based on your selection and keep the same formatting?

EpicSoccerPlayerPro
Автор

Thanks you this is great but can I make it clear single and merged cells in the same range?

darranelliott
Автор

thanx alot, it seems the clear code erases the cell lines aswell is there a code that erase the content of the cell only?

supboi
Автор

Hello, this is a very good tutorial and thank you. I have 1 question, say i have a range of excel i wanted to clear but certain cells have to skip, is there a formula that i can use rather than writing range one at a time? For instance Range(“C1”, “C7”).clear but i need to skip c8 and c9 then include C10-C12. Is it possible to do it in 1 range? Thank you

arashvarzandeh
Автор

Yikes. This worked. I created a button to clear the cells and it worked great. The only problem is that the .clear function also wiped out all my formatting, color fills, data validation and conditional formatting. :(

bryanchapman
Автор

thank you ❤️ ..have applied your code and it's working :)

suryadeepbiswas
Автор

Bro thanks for your video. Clearly understood. Do have the code for save files in excel format to pdf ?

prathipraj