Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am attempting to compress a column of data by deleting blank cells that has
lots of gaps in it. It errors at no. 256 on the for loop. The code i am using is: Sub CommandButton1_Click() Dim i As Double Dim cellcontent As String Range("A2").Select MsgBox "Cell selected" For i = 2 To 2150 Step 1 cellcontent = Sheets("Selection List").Cells(1, i) Do While ActiveCell.Value = "" Selection.Delete Loop ActiveCell.Offset(1, 0).Select Next i MsgBox "Selection list complete" End Sub All help is gratefully received (this is my first attempt at VBA) Ian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Error in loop | Excel Programming | |||
loop error | Excel Programming | |||
loop error | Excel Programming | |||
loop error | Excel Programming |