Thread
:
Variable Range & Sorting Macro
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Variable Range & Sorting Macro
Sub MoveNameToTopRow()
myname = InputBox("Enter name to move")
Rows(Columns("a").Find(What:=myname, LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Row).Cut
Rows(2).Insert
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"David127" wrote in message
...
I'm new to VBA & need to create a macro that can find the row with "Lou" &
move that row to the top of the data table. The hitch is the data table
postion & the number of rows vary from day to day. The example table below
Lou is in row 27 but he could be in row 14 or any other row. The data
table
is contigous but my start on row 1 or row 5.
Thanks in advance!
David
Ca Cb Cc Cd Ce
R1 Joe j k l a
R2 Sue d f e c
R... x x x x
R27 Lou i w z o
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett