Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default clear column content


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default clear column content

Hi Owl,

Try:

Columns(1).ClearContents '(Retain formatting)

or

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


---
Regards,
Norman


"owl527" wrote in
message ...

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default clear column content


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 Su

--
mudrake
-----------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247
View this thread: http://www.excelforum.com/showthread.php?threadid=54642

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clear up useless content within worksheet? Eric Excel Discussion (Misc queries) 1 May 31st 10 04:39 AM
Clear Cells Content No_Spam Excel Discussion (Misc queries) 2 August 20th 06 04:01 PM
Clear an XML Map of all content DangerMouse[_3_] Excel Programming 1 June 23rd 06 02:43 PM
Clear Columns Content Lizz45ie[_7_] Excel Programming 1 November 3rd 05 04:53 PM
Clear the content of a worksheet using VBA Shawshank Excel Programming 3 January 13th 04 03:47 PM


All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"