Delete blank columns in an exelsheet

%3CLINGO-SUB%20id%3D%22lingo-sub-1675646%22%20slang%3D%22en-US%22%3EDelete%20blank%20columns%20in%20an%20exelsheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1675646%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20to%20delete%20numerous%20blank%20columns%20in%20one%20of%20my%20exel%20programs.%20I%20tried%26nbsp%3B%20Ablebits%20as%20well%20as%3C%2FP%3E%3CP%3Eleft%20click%20columns%20designate%20with%20right%20click%20and%20delete%20neither%20one%20works%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20thoughts%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJM%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1675646%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1676768%22%20slang%3D%22de-DE%22%3ESubject%3A%20Delete%20blank%20columns%20in%20an%20exelsheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1676768%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F796408%22%20target%3D%22_blank%22%3E%40796408%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ETry%20using%20VBA%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EOption%20Explicit%0A%0ASub%20nikolino_del()%0ADim%20Spalte%20As%20Integer%0AApplication.ScreenUpdating%20%3D%20False%0AFor%20Spalte%20%3D%20256%20To%201%20Step%20-1%0A%20%20If%20Application.CountA(Columns(Spalte))%20%3D%200%20Then%0A%20%20%20%20%20Columns(Spalte).Delete%0A%20%20End%20If%0ANext%0AApplication.ScreenUpdating%20%3D%20True%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

I tried to delete numerous blank columns in one of my exel programs. I tried  Ablebits as well as

left click columns designate with right click and delete neither one works 

 

Any thoughts 

 

JM

1 Reply
Highlighted

@796408 

 

Try using VBA

 

Option Explicit

Sub nikolino_del()
Dim Spalte As Integer
Application.ScreenUpdating = False
For Spalte = 256 To 1 Step -1
  If Application.CountA(Columns(Spalte)) = 0 Then
     Columns(Spalte).Delete
  End If
Next
Application.ScreenUpdating = True
End Sub

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.