Announcement

Collapse
No announcement yet.

Excel VBA - clear the contents of an entire sheet.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Excel VBA - clear the contents of an entire sheet.

    How to clear the contents of an entire sheet.

    i want to delete the contents of the sheet1. without deleting the sheet.

  • #2
    Hi sachin123sood

    To clear all use;

    Sheet1.Cells.Clear

    To clear only content (no formats) use;

    Sheet1.Cells.ClearContents

    To Clear only formats use;

    Sheet1.Cells.ClearFormats

    To clear only cell comments use

    Sheet1.Cells.ClearComments

    Then there is also;

    Sheet1.Cells.ClearNotes

    and

    Sheet1.Cells.ClearOutline

    Comment


    • #3
      Re: Excel VBA - clear the contents of an entire sheet.

      Dear Dave,

      This is a thoroughly helpful response. Not only do you susinctly answer the question, you explain a couple of useful other option. If only the internet was always so well considered....

      Thank you.

      Comment

      Working...
      X