Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2017, 08:29 PM
jolivanes jolivanes is offline Macro to check against Columns & Delete Duplicates Windows 10 Macro to check against Columns & Delete Duplicates Office 2013
Advanced Beginner
 
Join Date: Sep 2011
Posts: 91
jolivanes will become famous soon enough
Default

Another way with CountIf.
Note the references again.


I don't know which code will be faster on a larger range.
Code:
Sub Maybe_B()
Dim i As Long
Application.ScreenUpdating = False
    With Range("F7:F" & Cells(Rows.Count, "F").End(xlUp).Row).Offset(, 1)
        .Formula = "= ""(""&LEFT(RC[-1],3)&"")""&"" ""&MID(RC[-1],5,3)&"" ""&MID(RC[-1],9,4)"
        .Value = .Value
    End With
    For i = 7 To Cells(Rows.Count, "F").End(xlUp).Row
        If WorksheetFunction.CountIf(Range("C" & i & ":E" & i), Range("G" & i)) = 3 Then Cells(i, 6).ClearContents
    Next i
    Columns("G:G").ClearContents
Application.ScreenUpdating = True
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to check against Columns & Delete Duplicates VBA: Delete duplicates in each row bandaanders Excel Programming 2 09-02-2015 08:15 AM
Macro to check against Columns & Delete Duplicates Excel vba to check to check if two columns are empty subspace3 Excel Programming 5 07-09-2015 04:45 PM
Macro to keep first instance and remove duplicates in certain column zhead Excel 2 03-18-2015 10:16 AM
Macro to check against Columns & Delete Duplicates find and delete duplicates rcVBA Word VBA 4 05-15-2013 03:08 PM
Macro to check against Columns & Delete Duplicates Deleting Duplicates in Macro jillapass Excel Programming 1 01-11-2012 10:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft