Hi there, was wondering if anyone would be able to give me a hand with a function I am using. Here it is below:

=IF(ISERROR(INDEX(Activities_export!$D$1:$E$97,SMALL(IF(Activities_export!$D$1:$E$97=$G$2,ROW(Activities_export!$D$1:$E$97)),ROW(1:1)),2)),"",INDEX(Activities_export!$D$1:$E$97,SMALL(IF(Activities_export!$D$1:$E$97=$G$2,ROW(Activities_export!$D$1:$E$97)),ROW(1:1)),2))
This nested function basically looks up a name on a different sheet and returns multiple values attached to that name, however it only works if the two columns are next to each other.

I would greatly appreciate if anyone could spread some light on how I could look up this name and return a value from a column that is far away from that, for example return values from A instead of D or E.

Thank you very much for any assistance.