Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
Hi all,
This question is in two parts. 1) How do you clear an entire column of date in vb code? 2)Is it possible to clear an entire column excluding some cells withi that colume? For example; Lets say i want to clear column "A" but want to exclude "A1" and "A2 from this clear function Is this possible? How! Cheers al -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
Hi Grovessy,
To delete contents and format: 1) Columns(1).Clear 2) Columns(1).Rresize(Rows.Count-2).Offset(2).Clear To delete contents but retain formatting, replace Clear with ClearContents. --- Regards, Norman. "grovesy " wrote in message ... Hi all, This question is in two parts. 1) How do you clear an entire column of date in vb code? 2)Is it possible to clear an entire column excluding some cells within that colume? For example; Lets say i want to clear column "A" but want to exclude "A1" and "A2" from this clear function Is this possible? How! Cheers all --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
Cheers Norman,
The first method does clear the entire column :) Unfortunately the second one (The clear column excluding some cells give me an error; -Object doesn't support this property or method- Any ideas? Thanks agai -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
Hi Grovesy,
A typo! Change: Columns(1).Rresize(Rows.Count-2).Offset(2).Clear to: Columns(1).Resize(Rows.Count-2).Offset(2).Clear --- Regards, Norman "grovesy " wrote in message ... Cheers Norman, The first method does clear the entire column :) Unfortunately the second one (The clear column excluding some cells) give me an error; -Object doesn't support this property or method- Any ideas? Thanks again --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
"grovesy " wrote in message ... Hi all, This question is in two parts. 1) How do you clear an entire column of date in vb code? range("A1").EntireColumn.ClearContents 2)Is it possible to clear an entire column excluding some cells within that colume? For example; Lets say i want to clear column "A" but want to exclude "A1" and "A2" from this clear function range("A3","A65536").ClearContents you can add ranges with Union union(range("C1","C30"),range("C32","C65536")).Cle arContents HTH Cecil |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a column
Thanks Norman,
I should have spotted that! You've been a great help Chri -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find clearing items in a column in Excel? | Excel Discussion (Misc queries) | |||
How do I find clearing items in a column in Excel? | Excel Worksheet Functions | |||
How do I clear a column of data without clearing specific cells? | Excel Discussion (Misc queries) | |||
How do I clear a column of data without clearing the formulas? | Excel Discussion (Misc queries) | |||
Clearing a Column range in Multiple Workbooks | Excel Programming |