View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kigol Kigol is offline
external usenet poster
 
Posts: 36
Default Column Cut/Paste possible?

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.