
Active Member

December 5, 2018

Hi Guys,
I've successfully run the following formula;
=INDEX(COUNTRY,IF(SUMPRODUCT(ISNUMBER(SEARCH(COUNTRY,$Q10))*ROW('ALL DATA REFS'!$G$1:$G$216))<>0,SUMPRODUCT(ISNUMBER(SEARCH(COUNTRY,$Q10))*ROW('ALL DATA REFS'!$G$1:$G$216)),NA()))
I have a named list called "country" which contains all the country names I need, the formula then looks within my selected cell (Q10) and returns the matching country name in another cell - in the 1st attached image you can see it's returning Iceland - which is correct!
In some circumstances there will be 2 or more countries listed in the cell, which using the above formula returns a #REF! (you can see in the second attached image) I assume because it has 2 results in the one cell. Is there any way to return both of those? If so how? Would it have to be done with an Array formula?
If you could help me out I would massively appreciate it.
Thank you!

Chloe

VIP

Trusted Members

June 25, 2016


VIP

Trusted Members

June 25, 2016


VIP

Trusted Members

June 25, 2016


Active Member

December 5, 2018

Hi Sunny,
Firstly thank you for getting back to me I really appreciate it! So if I understand you correctly, in the attachment you've created a custom function called "findcountry"? is that by using a Macro? Apologies I dont know a lot about macros or making custom functions :s Just want to understand what you've done here 🙂
thank you
Chloe


Trusted Members
Moderators

November 1, 2018

1 Guest(s)
