+ Reply to Thread
Results 1 to 3 of 3

clear column content

  1. #1
    Registered User
    Join Date
    03-10-2005
    Posts
    46

    clear column content

    Hi,
    How do I write a macro to delete the content of a column? Please let me know. THanks.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Record a macro as you select and clear a column.

    You will end up with a macro similar to this

    Sub Macro1()

    Columns("D:D").Select
    Selection.ClearContents
    End Sub

    The abave macro can be changed to

    Sub Macro1()

    Columns("D:D").ClearContents
    End Sub

  3. #3
    Norman Jones
    Guest

    Re: clear column content

    Hi Owl,

    Try:

    Columns(1).ClearContents '(Retain formatting)

    or

    Columns(1).Clear '(Clear contents and formatting)


    ---
    Regards,
    Norman


    "owl527" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    > How do I write a macro to delete the content of a column? Please let me
    > know. THanks.
    >
    >
    > --
    > owl527
    > ------------------------------------------------------------------------
    > owl527's Profile:
    > http://www.excelforum.com/member.php...o&userid=20916
    > View this thread: http://www.excelforum.com/showthread...hreadid=546424
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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