Sub Tester9()
Dim rng As Range, rng1 As Range
Dim rng3 As Range
With ActiveSheet
Set rng3 = .Range(Range("A1"), .UsedRange)
.Columns(3).Insert
rng3.Columns(3).Formula = _
"=If(Countif($B$1:B1,B1)1,NA())"
On Error Resume Next
Set rng = .Columns(3).SpecialCells(xlFormulas, xlErrors)
On Error GoTo 0
If Not rng Is Nothing Then
Set rng1 = Intersect(rng.EntireRow, Range("A:F"))
rng1.Select
rng1.Delete Shift:=xlShiftUp
End If
.Columns(3).Delete
End With
End Sub
--
Regards,
Tom Ogilvy
bkbri wrote in message
...
Hello,
Could someone please help me agian. I'm trying to get a Macro that will
search through my spread sheet and when it finds a dublicated text
entry in column B it will delete everything from A to E
__A___B___C___D___E
1.| T | P | A | C | W
2.| B | P | S | A | J <--- Dublicate P found Deleting A to E
3.| A | Y | N | L | Q
4.| D | E | X | E | I
5.| V | N | Z | F | U
And so on...
Thanks,
Brian
---
Message posted from http://www.ExcelForum.com/