Sub test()
Dim wb As Workbook, myAreas As Areas, r As Range, c As Range, s$, sp As Shape, HD()
Dim a, i&, ws As Worksheet, myNames, dic As Object, xx As Single
Set wb = ActiveWorkbook
Set dic = CreateObject("Scripting.Dictionary")
Set ws = wb.Sheets.Add
ws.UsedRange.Clear
For Each sp In ws.Shapes
sp.Delete
Next
Set myAreas = wb.Sheets("master tab").Rows(3).SpecialCells(2).Areas
ReDim myNames(1 To myAreas.Parent.Parent.UsedRange.Count), HD(1 To 2)
HD(1) = myAreas(1).Cells(1): HD(2) = myAreas(1).Cells(2)
For Each r In myAreas
Set c = r.CurrentRegion
a = c.Value
For i = 3 To UBound(a, 2)
ReDim Preserve HD(1 To UBound(HD) + 1): HD(UBound(HD)) = a(1, i)
Next
For i = 2 To UBound(a, 1)
If a(i, 1) <> "" Then
s = Join(Array(a(i, 1), a(i, 2)), Chr(2))
If Not dic.exists(s) Then
Set dic(s) = c(i, 1).Resize(c(i, 1).MergeArea.Rows.Count, UBound(a, 2))
myNames(dic.Count) = s
End If
End If
Next
Next
ReDim Preserve HD(1 To UBound(HD) + 1): HD(UBound(HD)) = "Notes"
ReDim Preserve myNames(1 To dic.Count)
mySort myNames, 1, UBound(myNames)
GetAllData myAreas, HD, myNames, dic, ws, 4
End Sub