Bass71
MIS
- Jun 21, 2001
- 79
Is there a more sophisticated/streamlined way of writing the IF Then stated below, which determines if cells in Cols A-F are identical to the those in the following row and then iterates? For the life of me, I cannot get the Range, Set Range etc syntax down. This is what I've got and it works, but looks so damned cumbersome, I know there's a better way.
Thanks...........RO
Range("F1").Select
Do
If ActiveCell(1, -4).Value = ActiveCell(2, -4).Value And _
ActiveCell(1, -3).Value = ActiveCell(2, -3).Value And _
ActiveCell(1, -2).Value = ActiveCell(2, -2).Value And _
ActiveCell(1, -1).Value = ActiveCell(2, -1).Value And _
ActiveCell(1, 0).Value = ActiveCell(2, 0).Value And _
ActiveCell.Value = ActiveCell(2, 1).Value Then...
Loop Until ActiveCell.Value=""
Thanks...........RO
Range("F1").Select
Do
If ActiveCell(1, -4).Value = ActiveCell(2, -4).Value And _
ActiveCell(1, -3).Value = ActiveCell(2, -3).Value And _
ActiveCell(1, -2).Value = ActiveCell(2, -2).Value And _
ActiveCell(1, -1).Value = ActiveCell(2, -1).Value And _
ActiveCell(1, 0).Value = ActiveCell(2, 0).Value And _
ActiveCell.Value = ActiveCell(2, 1).Value Then...
Loop Until ActiveCell.Value=""