J
JamesArchibald
Hi,
I am trying to set up a macro that will compate the active cell i
Sheet 1 column AD against the value in Sheet 2 cell reference A2. I
the active cell matches the value in Sheet 2 cell A2 the row will b
ignored and the active cell will move down a row. If the active cel
does not match the value in Sheet 2 cell A2 the whole row will b
deleted. This should repeat until a blank row is found in Sheet 1.
think I am looking for something like the code below:
Range("AD:AD").Select
Do While ActiveCell <> 0
Test = (ActiveCell) = (Sheet2!A2)
If Test = True Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Delete
End If
Loop
The problem is that "Test = (ActiveCell) = (Sheet2!A2)" doesn't appea
to compare the two values.
Can anyone help?
Thanks
Jame
I am trying to set up a macro that will compate the active cell i
Sheet 1 column AD against the value in Sheet 2 cell reference A2. I
the active cell matches the value in Sheet 2 cell A2 the row will b
ignored and the active cell will move down a row. If the active cel
does not match the value in Sheet 2 cell A2 the whole row will b
deleted. This should repeat until a blank row is found in Sheet 1.
think I am looking for something like the code below:
Range("AD:AD").Select
Do While ActiveCell <> 0
Test = (ActiveCell) = (Sheet2!A2)
If Test = True Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Delete
End If
Loop
The problem is that "Test = (ActiveCell) = (Sheet2!A2)" doesn't appea
to compare the two values.
Can anyone help?
Thanks
Jame