Moving Row

  • Thread starter Thread starter Misho
  • Start date Start date
M

Misho

How can I move entire row after one cell value change to Yes, then the row
will move to another location after another row below.
 
Record a macro while doing to see what you get. Post back with your macro
for more help
 
Thanks Don,

I record a macro and it's working, but why the macro apply for all the
worksheet, it will apply only once for each macro run.
 
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You send a clear explanation of what you want
3. You send before/after examples and expected results.
 
The file sent to you.

Don Guillett said:
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You send a clear explanation of what you want
3. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
Sub MoveRowToFilesSentToTaqiSAS()
'Select any cell on the desired row and execute to move that row
r = ActiveCell.Row
dr = Columns("A:C").Find(What:="FILES SENT TO TAQI", _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Row + 1
If r < 4 Or r > dr - 1 Then Exit Sub
Cells(r, 2) = "J.R."
Rows(r).Cut
Rows(dr).Insert
End Sub
 
Thanks Don

Don Guillett said:
Sub MoveRowToFilesSentToTaqiSAS()
'Select any cell on the desired row and execute to move that row
r = ActiveCell.Row
dr = Columns("A:C").Find(What:="FILES SENT TO TAQI", _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Row + 1
If r < 4 Or r > dr - 1 Then Exit Sub
Cells(r, 2) = "J.R."
Rows(r).Cut
Rows(dr).Insert
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
Back
Top