View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Craig[_24_] Craig[_24_] is offline
external usenet poster
 
Posts: 39
Default find and move data within a column

I'm trying to find a couple of items within a column and move them down
(either one or two positions depending on which item it's moving). I'm
having 2 problems, first if the item it's moving is the first value in
the column, it won't move down, and second, if the item to be moved is
the last item in the column, i need it to move to the top then move, so
the column is a continuos loop. Any ideas, here's what i have so far

Sub MoveDown()
[m1].Select
Cells.Find(what:="A", after:=ActiveCell, LookIn:=xlFormulas,
lookat:= _
xlPart, searchorder:=xlByColumns, searchdirection:=xlNext,
MatchCase:= _
False, searchformat:=False).Activate
Application.CutCopyMode = False
Selection.Cut
ActiveCell(r + 3).Select
Selection.Insert shift:=xlDown
[m1].Select
Cells.Find(what:="B", after:=ActiveCell, LookIn:=xlFormulas,
lookat:= _
xlPart, searchorder:=xlByColumns, searchdirection:=xlNext,
MatchCase:= _
False, searchformat:=False).Activate
Selection.Cut
ActiveCell(r + 4).Select
Selection.Insert shift:=xlDown
End Sub