Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Names()
totrows = Range("A1").CurrentRegion.Rows.Count
'First check for duplicates
Cells.Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("G9").Select
Range("J2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-8]=R[1]C[-8],1,"""")"
Range("J2").Select
Selection.AutoFill Destination:=Range("J2:J" & totrows), Type:=xlFillDefault
Range("J2:J" & totrows).Select
anscheck = totrows + 2
Range("J" & anscheck).Select
Formula = "=sum(J2:J" & totrows & ")"
ActiveCell = Formula
Range("J" & anscheck).Select
If ActiveCell = 0 Then GoTo here1
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "There Are Duplicate Entries. Check Column J for ""1""s to find the duplicates" ' Define message.
Style = vbOKOnly ' Define buttons.
Title = "Number Checker" ' Define title.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbOK Then End
here1:
Columns("J:J").Select
Selection.ClearContents
'End of duplicate check
nameslen = 0
namestr = ""
For Count = 2 To totrows
Range("A" & Count).Select
tenno = ActiveCell
Range("B" & Count).Select
extnno = ActiveCell
Range("C" & Count).Select
namestr = ActiveCell
AppActivate "ANDD"
' For x = 1 To 600
' Next x
SendKeys tenno, True
SendKeys ("{tab}"), True
SendKeys extnno, True
SendKeys ("{tab} "), True
If nameslen > 0 Then
For namecount = 1 To nameslen
SendKeys ("{backspace}"), True
Next namecount
End If
SendKeys namestr, True
SendKeys ("{enter} "), True
nameslen = Len(namestr)
Next Count
End Sub