# Moving entire row to the bottom of the list

#### vikramjeet

##### New Member
Hi,

Is there a way to move an entire row to the bottom of the list if certain value appears in that particular row.

ROW Emp ID Name Mon Tue Wed Thu Fri
1-Nov 2-Nov 3-Nov 4-Nov 5-Nov
1 123 JOHN P P P
2 124 WILLIAM P P P
3 125 TRACY P P A
4 126 TARA P P P
5 127 FRANK P P P
6 128 BILL P P A
7 129 GEORGE P P P
8 130 BRUCE P P P
9 131 GRACE P P P
10 132 SARAH P P P

In this case Tracy and Bill were Absent on a particular day. The entire row 3 and 6 should move to the bottom of the list automatically when "A" is entered in the cell.

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Krishnakumar

##### Well-known Member
Hi,

Code:
``````Private Sub Worksheet_Change(ByVal Target As Range)
Dim lRow    As Long
lRow = Range("A" & Rows.Count).End(xlUp).Row
If UCase(Target.Value) = "A" Then
Application.EnableEvents = False
Target.EntireRow.Cut
Rows(lRow + 1).Insert Shift:=xlDown
Application.EnableEvents = True
End If
End Sub``````

HTH

Replies
6
Views
435
Replies
7
Views
303
Replies
2
Views
821
Replies
20
Views
929
Replies
0
Views
237

1,171,730
Messages
5,877,160
Members
433,235
Latest member

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back