Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to delete an entire column if it is EMPTY
Please help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteEmptyColumns()
lastcol = ActiveSheet.Cells(ActiveCell.Row, _ Columns.Count).End(xlToLeft).Column Application.ScreenUpdating = False For r = lastcol To 1 Step -1 If Application.CountA(Columns(r)) = 0 Then Columns(r).Delete End If Next r Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Tue, 16 Dec 2008 15:43:01 -0800, ya wrote: I want to delete an entire column if it is EMPTY Please help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete Rows based on condition | Excel Discussion (Misc queries) | |||
Delete worksheet row based on condition | Excel Programming | |||
How to delete a data row based on a condition | New Users to Excel | |||
Is there a way to delete a cell value based on a condition? | Excel Discussion (Misc queries) | |||
Delete Columns based on a condition | Excel Programming |