Macro help in veryifying data
I have the following macro which looks up for duplicated data in columns
E&F.
Sub MacroForButton()
Dim EndRow As Integer
On Error Resume Next
ActiveWorkbook.Names("MyRange").Delete
EndRow = Range("E65536").End(xlUp).Row
Range("E4:F" & EndRow & "").Name = "MyRange"
'Clear all Conditional Format in E and F
Columns("E:F").FormatConditions.Delete
'Assign Conditional Formatting to Range
Range("E4").Select
Range("MyRange").FormatConditions.Add Type:=xlExpression, Formula1:= _
"=SUMPRODUCT(($E$4:$E$" & EndRow & "=$E4)*($F$4:$F$" & EndRow &
"=$F4))1"
Range("MyRange").FormatConditions(1).Interior.Colo rIndex = 6
End Sub
What I need help on is how can I modify this macro so that it still
looks for duplicated data but in columns D to I and where its looking
for duplication is in sheet 1 and 2 in a workbook. So if any of the
data on sheet 1 is duplicated on sheet 2 it would highlight it. Can
anyone help?
Many Thanks
--
tweacle
|