Finding the duplicates and errors.

kishorkhanal

Active Member
Joined
Mar 23, 2006
Messages
434
I have text and number values in random order in column A. In column E I have same values in A but in different order. I have to manually type both of these values. I want to format cells in column E so that if I type any values other than A, the cell should fill with red and if any value duplicates in either column A or E then the duplicated cells should fill with yellow. Any suggestions.
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
try this event macro

right click the sheet tab and click view code and copy this macro

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cfind As Range
If Target.Column <> 5 Then Exit Sub
With Columns("a:a")
On Error Resume Next
Set cfind = .Find(what:=Target.Value, lookat:=xlWhole)
If cfind Is Nothing Then Target.Interior.ColorIndex = 3
End With
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,514
Messages
5,602,091
Members
414,501
Latest member
mdhaumyu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top