Hi all,
I am trying to turn a formula into a macro. I have the active workbook which I am pulling data into, and the lookup workbook which I am pulling the data from.
The formula looks up the name in column A of the active workbook and finds it in column B in the lookup workbook. Once it finds the name in the lookup workbook, it returns all corresponding sports from column A of lookup workbook into column BL of the active workbook.
Note: There are 10 rows for every name in the active workbook. The formula only returns the unique values that match the name and leaves the remainder of the 10 cells blank. See screenshots attached. Thanks in advance!
Current Formula:
=IF(ISERROR(INDEX([LookupFile!$A:$B,SMALL(IF([LookupFile!$B:$B=$A6,ROW([LookupFile!$B:$B)-ROW($A$1)+1),COUNTIF(A$6:A6,A6)),1)),"",INDEX([LookupFile!$A:$B,SMALL(IF([LookupFile!$B:$B=$A6,ROW([LookupFile!$B:$B)-ROW($A$1)+1),COUNTIF(A$6:A6,A6)),1))
I am trying to turn a formula into a macro. I have the active workbook which I am pulling data into, and the lookup workbook which I am pulling the data from.
The formula looks up the name in column A of the active workbook and finds it in column B in the lookup workbook. Once it finds the name in the lookup workbook, it returns all corresponding sports from column A of lookup workbook into column BL of the active workbook.
Note: There are 10 rows for every name in the active workbook. The formula only returns the unique values that match the name and leaves the remainder of the 10 cells blank. See screenshots attached. Thanks in advance!
Current Formula:
=IF(ISERROR(INDEX([LookupFile!$A:$B,SMALL(IF([LookupFile!$B:$B=$A6,ROW([LookupFile!$B:$B)-ROW($A$1)+1),COUNTIF(A$6:A6,A6)),1)),"",INDEX([LookupFile!$A:$B,SMALL(IF([LookupFile!$B:$B=$A6,ROW([LookupFile!$B:$B)-ROW($A$1)+1),COUNTIF(A$6:A6,A6)),1))