Seiya,
Thanks for the quick reply.
I probably should have given more detail in by original question; I have a colourcoding macro in worksheet module; this seems to be causing a problem when I add the code you supplied.
Sheet 1 is titled `Current Work Orders` and Sheet 2 is Àrchived`.
I messed around with the your code but confess I really dont have enough knowledge to know if I am improving the situation or making it worse!!
I also noticed that when the data is cleared from Sheet 1, the drop list is no longer available in that row.
Sheet 1 looks like this; (some columns are omitted due to personal info)
Current Work Orders
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 107px"><COL style="WIDTH: 36px"><COL style="WIDTH: 206px"><COL style="WIDTH: 84px"><COL style="WIDTH: 81px"><COL style="WIDTH: 75px"><COL style="WIDTH: 165px"><COL style="WIDTH: 165px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 34px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Work Order</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Task</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">STATUS</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-SIZE: 8pt; FONT-WEIGHT: bold">% Completion</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Due by</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Scheduled Start Date</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Description</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; FONT-FAMILY: Calibri; FONT-WEIGHT: bold">Location</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD><TD style="BACKGROUND-COLOR: #c0c0c0"></TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD style="TEXT-ALIGN: center">772255</TD><TD style="TEXT-ALIGN: center">01</TD><TD style="TEXT-ALIGN: center">AWAITING 3rd PARTY</TD><TD style="TEXT-ALIGN: center">99</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #f0f0f0">09/11/2008</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #f0f0f0">15/07/2009</TD><TD style="TEXT-ALIGN: center">1 Guy</TD><TD style="TEXT-ALIGN: center">Maki Rd, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD style="TEXT-ALIGN: center">772488</TD><TD style="TEXT-ALIGN: center">01</TD><TD style="TEXT-ALIGN: center">AWAITING 3rd PARTY</TD><TD style="TEXT-ALIGN: center">99</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #f0f0f0">09/11/2008</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #f0f0f0">15/07/2009</TD><TD style="TEXT-ALIGN: center">1 Guy</TD><TD style="TEXT-ALIGN: center">Maki Rd, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">782417</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">COMPLETE - Awaiting Inspection</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">100</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">12/02/2009</TD><TD style="BACKGROUND-COLOR: #ff99cc"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">5 Poles Emerg T&T, Coutenay</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff99cc">Mt Washington, Strathcona</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">814343</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">SCHEDULED</TD><TD style="BACKGROUND-COLOR: #ccffff"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">20/07/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Tx, Arr, HU service</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Kennedy St, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">10</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">807160</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">SCHEDULED</TD><TD style="BACKGROUND-COLOR: #ccffff"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">07/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">22/07/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Pole Replacement</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Fitzwilliam St, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">816433</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">SCHEDULED</TD><TD style="BACKGROUND-COLOR: #ccffff"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">17/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01/07/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Pole Replacement</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Raines Rd, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">799190</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">SCHEDULED</TD><TD style="BACKGROUND-COLOR: #ccffff"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">18/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">13/07/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">2 Pole Replacements</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Yellowpoint Rd</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">13</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">807187</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">01</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">SCHEDULED</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">60</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">18/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff; COLOR: #339966; FONT-WEIGHT: bold">29/06/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Pole Renewal</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ccffff">Place Rd, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">14</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">772635</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">02</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">WORKING</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">20</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">24/05/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">15/06/2009</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">Install New 3ph line</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #33cccc">Boxwood Rd, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">15</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">776791</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">04</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">COMPLETE</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">100</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">24/05/2009</TD><TD style="BACKGROUND-COLOR: #ffcc00"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">Line Deviation</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">Norasea, NAN</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">776791</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">07</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">COMPLETE</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">100</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">24/05/2009</TD><TD style="BACKGROUND-COLOR: #ffcc00"></TD><TD style="BACKGROUND-COLOR: #ffcc00"></TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc00">Norasea Rd, NAN</TD></TR></TBODY></TABLE>
Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
And the code for this sheet is as follows;
Private Sub Find_Click()
'
' Find Macro
' Macro recorded 16/06/2009 by XXXXXXXXXXX
'
'
Cells.Find(What:=Search.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
End Sub
Private Sub Possesion_Click()
' Arrange by Current Owner
Range("B6:Z100").Sort Key1:=Range("K6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub Search_Change()
End Sub
Private Sub Status_Click()
' Arrange by STATUS
Range("B6:Z100").Sort Key1:=Range("E6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub WONumber_Click()
' Arrange by Work Order number
Range("B6:Z100").Sort Key1:=Range("C6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub DueDate_Click()
' Arrange by Due Date
Range("B6:Z100").Sort Key1:=Range("G6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub StartDate_Click()
' Arrange by Start Date
Range("B6:Z100").Sort Key1:=Range("H6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, i As Long
Dim cell As Range, Answers As Variant
Dim Colors As Variant
Colors = Array(24, 15, 38, 44, 42, 20, 36)
Answers = Array("CLOSED", "SUSPENDED", _
"COMPLETE - Awaiting Inspection", "COMPLETE", "WORKING", _
"SCHEDULED", "READY")
Set rng = Range("E6:E100")
rng.EntireRow.Interior.ColorIndex = xlNone
For Each cell In rng
For i = LBound(Answers) To UBound(Answers)
If LCase(cell) = LCase(Answers(i)) Then
cell.EntireRow.Interior.ColorIndex = Colors(i)
Exit For
End If
Next i
Next cell
End Sub
When I added the copy and move code; I did this;
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, i As Long
Dim cell As Range, Answers As Variant
Dim Colors As Variant
Colors = Array(15, 38, 44, 42, 20, 36)
Answers = Array("SUSPENDED", _
"COMPLETE - Awaiting Inspection", "COMPLETE", "WORKING", _
"SCHEDULED", "READY")
Set rng = Range("E6:E100")
rng.EntireRow.Interior.ColorIndex = xlNone
For Each cell In rng
For i = LBound(Answers) To UBound(Answers)
If LCase(cell) = LCase(Answers(i)) Then
cell.EntireRow.Interior.ColorIndex = Colors(i)
Exit For
End If
Next i
Next cell
If Intersect(Target, Columns("e")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Count > 1 Then
MsgBox "You can not change multiple cells in col.E"
Application.Undo
Else
If Target.Value = "CLOSED" Then
Target.EntireRow.Cut _
Sheets("sheet2").Range("a" & Rows.Count).End(xlUp)(2)
Application.CutCopyMode = False
End If
End If
Application.EnableEvents = True
End Sub
Hope this better explains what I,m trying to do and thanks for the help