Hello trevor2524,
Was this macro also created using Excel 2013 or an earlier version?
Hello trevor2524,
Was this macro also created using Excel 2013 or an earlier version?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
It was also created using Excel 2013. Here is the code I used to find the duplicates and mark them as red.
![]()
Sub FindDups() ' ' NOTE: You must select the first cell in the column and ' make sure that the column is sorted before running this macro ' Application.ScreenUpdating = False FirstItem = ActiveCell.Value SecondItem = ActiveCell.Offset(1, 0).Value Offsetcount = 1 Do While ActiveCell <> "" If FirstItem = SecondItem Then ActiveCell.Offset(0, 0).Interior.Color = RGB(255, 0, 0) ActiveCell.Offset(Offsetcount, 0).Interior.Color = RGB(255, 0, 0) Offsetcount = Offsetcount + 1 SecondItem = ActiveCell.Offset(Offsetcount, 0).Value Else ActiveCell.Offset(Offsetcount, 0).Select FirstItem = ActiveCell.Value SecondItem = ActiveCell.Offset(1, 0).Value Offsetcount = 1 End If Loop End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks