![]() |
|
#2
|
|||
|
|||
|
The Column to the right of your 4 columns with phone numbers needs to be free to use.
Change references as required. This code is for Column C to G. Code:
Sub Try_This()
Dim i As Long
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 Cells(i, 7) = Cells(i, 3) And Cells(i, 7) = Cells(i, 4) And Cells(i, 7) = Cells(i, 5) Then Cells(i, 6).Value = ""
Next I
Columns("G:G").ClearContents
End Sub
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA: Delete duplicates in each row
|
bandaanders | Excel Programming | 2 | 09-02-2015 08:15 AM |
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 |
find and delete duplicates
|
rcVBA | Word VBA | 4 | 05-15-2013 03:08 PM |
Deleting Duplicates in Macro
|
jillapass | Excel Programming | 1 | 01-11-2012 10:02 AM |