VBA Code:

```
Public Sub TestMe()
'Range("G1").FormulaArray = "=INDEX(A2:A6,MATCH(F1,B2:B6,0))" ' This works
'Range("G2").FormulaArray = "=IF(ISERROR(INDEX($A$2:$A$6,SMALL(IF($B$2:$B$6=$F$1,ROW($A$2:$A$6)),ROW(1:1)),1)),"",INDEX($A$2:$A$6,SMALL(IF($B$2:$B$6=$F$1,ROW($A$2:$A$6)),ROW(1:1)),1))" ' This gives me a 1004 Error
End Sub
```