+ Reply to Thread
Results 1 to 3 of 3

How to clear data in particular column keeping Header as it is using VBA

  1. #1
    Registered User
    Join Date
    06-22-2016
    Location
    Pune
    MS-Off Ver
    2010
    Posts
    14

    How to clear data in particular column keeping Header as it is using VBA

    Hello,
    I wants to clear data which is shown red color.
    i tried with below code

    Private Sub CommandButton1_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Set wb = ActiveWorkbook

    Sheets("Sheet1").Rows("2:" & Rows.Count).ClearContents


    End Sub

    clear.JPG

    i am not getting any idea please help me.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How to clear data in particular column keeping Header as it is using VBA

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How to clear data in particular column keeping Header as it is using VBA

    Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.

    If you are unclear about the request or instruction then send a private message to them asking for clarification.

    All participants:
    Please do not post a reply in a thread where a moderator has requested an action that has not yet been complied with e.g Title change or Code tags...etc. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. can i clear data except leaving Header row using vba
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2014, 06:35 AM
  2. [SOLVED] can i clear data except leaving Header row using vba
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2014, 06:26 AM
  3. Replies: 3
    Last Post: 04-28-2014, 02:24 PM
  4. [SOLVED] Clear all data below header row in specific column
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2014, 04:50 PM
  5. How do you clear the label in a column header?
    By susiesc in forum Excel General
    Replies: 8
    Last Post: 03-31-2013, 01:35 PM
  6. Keeping two tables equal based on header column
    By cyclops755 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2011, 08:41 AM
  7. Replies: 3
    Last Post: 11-27-2008, 12:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1