Help With Macro

  steviegee 08:46 13 Jul 10
Locked

I was given the macro below to highlight any cell with data in it that is on sheet 2 but not on sheet 1. Could it also work the same to highlight what is on sheet 4 but not on sheets 1, 2 and 3? If so what would the new macro be please? Thanks.

Sub steviegee()
Dim c As Range, Found As Range
With Sheets("Sheet2")
For Each c In .UsedRange
Set Found = Sheets("Sheet1").UsedRange.Find(what:=c.Value)
If Found Is Nothing Then c.Interior.ColorIndex = 3
Next c
End With
End Sub

  VoG II 09:14 13 Jul 10

A bit kludgy but try

Sub steviegee()
Dim c As Range, Found As Range
With Sheets("Sheet4")
For Each c In .UsedRange
Set Found = Sheets("Sheet1").UsedRange.Find(what:=c.Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Set Found = Sheets("Sheet2").UsedRange.Find(what:=c.Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Set Found = Sheets("Sheet3").UsedRange.Find(what:=c.Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then c.Interior.ColorIndex = 3
Next c
End With
End Sub

This thread is now locked and can not be replied to.

Huawei P10 review

1995-2015: How technology has changed the world in 20 years

An overview: What leading creative agencies are doing to improve diversity

New iPad, iPhone SE & Red iPhone 7 on sale now