Is there a more efficient way to handle this since it only returns the one value per row(1:1)
perhaps a case statement since F1 will be the value checked and it be a drop down list to check
or a case and countif and return all the matching values from single code line setup
perhaps a case statement since F1 will be the value checked and it be a drop down list to check
or a case and countif and return all the matching values from single code line setup
VBA Code:
Public Sub TestMe()
Range("G2").FormulaArray= "=IF(ISERROR(INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(1:1)),1)),"""",INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(1:1)),1))"
Range("G3").FormulaArray= "=IF(ISERROR(INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(2:2)),1)),"""",INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(2:2)),1))"
Range("G4").FormulaArray= "=IF(ISERROR(INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(3:3)),1)),"""",INDEX($A$1:$A$35,SMALL(IF($B$1:$B$35=$F$1,ROW($B$1:$B$35)),ROW(3:3)),1))"
End Sub