Sub CopyData()
Application.ScreenUpdating = False
Dim i As Long, dic As Object, phone1 As Long, phone2 As Long, workers As Long, positions As Variant, arr() As Variant
Dim v1 As Variant, v2 As Variant, lRow As Long, lRow2 As Long, x As Long, pos As String
phone1 = Rows(1).Find("Phone", LookIn:=xlValues, lookat:=xlWhole, SearchDirection:=xlNext).Column
phone2 = Rows(1).Find("Phone", LookIn:=xlValues, lookat:=xlWhole, SearchDirection:=xlPrevious).Column
workers = Rows(1).Find("Workers", LookIn:=xlValues, lookat:=xlWhole, SearchDirection:=xlNext).Column
lRow = Columns(1).Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
lRow2 = Columns(workers).Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
positions = Array("CEO", "VPs", "Senior manager", "Junior manager", "Managers", "Workers")
v1 = Range("A1", Range("A" & Rows.Count).End(xlUp)).Resize(, phone1).Value
v2 = Range(Cells(1, workers), Cells(lRow2, workers)).Resize(, phone2).Value
Set dic = CreateObject("Scripting.Dictionary")
For i = LBound(v1) To UBound(v1)
If Not IsError(Application.Match(v1(i, 1), positions, 0)) And v1(i, 1) <> "" Then
pos = v1(i, 1)
End If
If IsError(Application.Match(v1(i, 1), positions, 0)) And v1(i, 1) <> "" Then
dic.Add v1(i, 1), v1(i, phone1) & "|" & pos
End If
Next i
For i = LBound(v2) To UBound(v2)
If Not IsError(Application.Match(v2(i, 1), positions, 0)) And v1(i, 1) <> "" Then
pos = v2(i, 1)
End If
If IsError(Application.Match(v2(i, 1), positions, 0)) And v2(i, 1) <> "" Then
dic.Add v2(i, 1), v2(i, phone2 - workers + 1) & "|" & pos
End If
Next i
With Sheets("Sheet2")
.Range("A1").Resize(, 3).Value = Array("FullName", "Phone", "Position")
.Range("A2").Resize(dic.Count).Value = Application.Transpose(dic.keys)
lRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
.Range("B2").Resize(dic.Count).Value = Application.Transpose(dic.items)
v1 = .Range("B2", .Range("B" & .Rows.Count).End(xlUp)).Value
End With
ReDim arr(1 To lRow - 1, 1 To 2)
For i = LBound(v1) To UBound(v1)
x = x + 1
arr(x, 1) = Split(v1(i, 1), "|")(0)
arr(x, 2) = Split(v1(i, 1), "|")(1)
Next i
Sheets("Sheet2").Range("B2").Resize(x, 2) = arr
Application.ScreenUpdating = True
End Sub