Could someone explain what is happening here? Preferably line for line. I am having a hard time wrapping my head around what is happening with this bit.

```
                a = Application.Transpose(a)
            For i = 1 To UBound(a, 2)
                If UCase(a(1, i)) Like "*" & temp & "*" Or _
                UCase(a(2, i)) Like "*" & temp & "*" Then
                    n = n + 1
                    For ii = 1 To UBound(a, 1)
                        a(ii, n) = a(ii, i)
                    Next
                End If
            Next

```

I am also experiencing a "type mismatch" error for the above. See full Sub below.

```
Private Sub TextBox_Search_Change()
Select Case True
    Case OptionButton_User_Name.Value
        Dim a, i As Long, ii As Long, n As Long, temp As String
        If Len(Me.TextBox_Search.Value) Then
            temp = UCase(Me.TextBox_Search.Value)
            With Sheets("ToolData")
                a = Union(.Range("B:B"), .Range("F:F"), .Range("G:G")).Value
            End With
            a = Application.Transpose(a)
            For i = 1 To UBound(a, 2)
                If UCase(a(1, i)) Like "*" & temp & "*" Or _
                UCase(a(2, i)) Like "*" & temp & "*" Then
                    n = n + 1
                    For ii = 1 To UBound(a, 1)
                        a(ii, n) = a(ii, i)
                    Next
                End If
            Next
            If n > 0 Then
                ReDim Preserve a(1 To UBound(a, 1), 1 To n)
                Me.ListBox_History.Column = a
            End If
        Else
            With Sheets("ToolData")
                Me.ListBox_History.List = Union(.Range("B:B"), .Range("F:F"), .Range("G:G")).Value
            End With
        End If

    Case Else
End Select 

```