where are the arrays coming from?
where are they in your worksheet?
where do you want the result to go?
will it always go to the same cell location?

For X = 0 To 8
    For Y = 0 To 8
        If A(X) = B(Y) And A(X) <> 0 Then
            C = C & " " & A(X)
        End If
    Next Y
Next X
'To put the result in a cell do this:

Range("A1").value = C

MsgBox C