Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move row last on change of value
I have the following code Public val As String Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 3 And UCase(Target.Value) = "JA" And UCase(val) = "NEJ" Then Target.EntireRow.Cut Range("A65536").End(xlUp).Offset(1, 0).Select ActiveSheet.Paste End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) val = Target.Value End Sub If I change the value from NO to YES in a row in column C, I like the row ro be moved down below the other used rows in the sheet. It moves the row allright, but then fails with Runtime Error 13: Type Mismatch in line If Target.Column = 3 And UCase(Target.Value) = "YES" And UCase(val) = "NO" Then If I disable events nothing happens at all. How can I Solve this? Jan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cntl Key move/select to change in value | Excel Discussion (Misc queries) | |||
Formula to change move down one cell | Excel Discussion (Misc queries) | |||
Worksheet change: move to next cell | Excel Programming | |||
How 2 tie cells in same row so they move as a ROW if table change | Excel Discussion (Misc queries) | |||
when i move or copy a sheet, dates change by one day?? | Excel Discussion (Misc queries) |