Hi,
The first statement (underlined) in the Sub Procedure below is meant to test whether or not the value in the current selection is greater than 50000. When the procedure is run it is selecting values of less than 50000 as well as values greater than 50000.
Please will someone show me where I am going wrong.
Thanks.
Rob.
The first statement (underlined) in the Sub Procedure below is meant to test whether or not the value in the current selection is greater than 50000. When the procedure is run it is selecting values of less than 50000 as well as values greater than 50000.
Please will someone show me where I am going wrong.
Code:
Sub Analyse()
Sheets("Market Interface").Select
Range("p4").Select
Do Until IsEmpty(ActiveCell)
[U]If Selection.Value > 50000 And[/U] _
Selection.Offset(0, -13).Value > Selection.Offset(0, 11).Value And _
Selection.Offset(0, 23).Value > 0 And _
Selection.Offset(0, -3).Value = Selection.Offset(0, -13).Value And _
Selection.Offset(0, -13).Value < Selection.Offset(0, 8).Value And _
Selection.Offset(0, -10).Value > Selection.Offset(0, 8).Value Or _
Selection.Offset(0, -6).Value > Selection.Offset(0, 8).Value Then _
Selection.Offset(0, -2).Copy Sheets("User Interface").Range("a:a").Cells(Rows.Count).End(xlUp).Offset(1, 0)
Selection.Offset(1, 0).Select
Loop
End Sub
Rob.