On Jun 25, 1:58 pm, Kigol <raw4...@aol.com> wrote:
> 1) When I use insert twice, it can create a large number of blank
> columns between the sorted data and the raw data, much more than
> expected for some reason. I do not want this.
>
> 2) If I cut/paste into a blank column, it errors. Apparently you
> cannot paste columns?
>
> For x = 1 To 18
> Columns(x).Insert
>
> Set testrng = Cells.Find(What:=Me.Controls("ComboBox" &
> x).Value, After:=ActiveCell, LookAt:=xlWhole, SearchOrder:=xlByRows,
> SearchDirection:=xlNext, MatchCase:=False)
>
> If Not testrng Is Nothing Then
> testrng.EntireColumn.Cut
> Columns(x).Insert '(Ideally I would like to
> PasteSpecial to eliminate all the excessive column creation.)
> End If
> Next x
>
> Any insight is appreciated.
On a side note does instering columns create non-blank cells? Because
after running the above code and being left with empty columns, if I
run it again blank values are pulled into my array. I have tried all
methods of blank cell testing you can suggest so there must be another
cause.
|