Blue Norris
Blue Norris

Reputation: 7

Excel delete button

This is probably pretty simple to do but i'm still not totally sure how. I need a button that deletes selected text in excel, pretty much the same way as you would select a text and press delete on your keyboard.

Upvotes: 0

Views: 2665

Answers (2)

Andy G
Andy G

Reputation: 19367

You can add a button to the worksheet from the Developers tab, using a simple Form Control. Selection.Clear or Selection.ClearContents will.. clear everything, or just the contents, from the current selection:

Sub Button1_Click()
    Selection.Clear
End Sub

But presumably you want to be able to use this from anywhere, not just in a specific worksheet. In which case, create the Macro first and then Customize the Quick Access Toolbar to add a button to run the macro.

Upvotes: 1

Yubaraj
Yubaraj

Reputation: 3988

Click on your text or cell where your text is written. Simply click del key from keyboard. or see below image for more details.

enter image description here

Upvotes: 1

Related Questions