comma separated values - lookup on Google Sheets

YvesV

New Member
Joined
Sep 15, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
HI everyone. I have a dataset with comma separated values in two columns (B and C), the source and target language columns (see screenshot). I would want to do a lookup somehow, so that I can find anyone that has ENglish as a source language and Swedish as a target language. To give just one example. In column A I have the names (not shown here for privacy reasons), so I would want to get those names as the result. All names.

I've had two issue with different methods I tried:

- I either ended up with English as a source language result, only if it was the only language someone mastered. Not if they had multiple languages and English happened to be one of them.
- On another instance, I got the result, but it only showed me one.

But rather than fumbling around, there is maybe someone with an easy answer :)

Many thanks,


Yves
Screenshot_1.png
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
EDIT NOTE: I just noticed this question was being asked for Google Sheets... I know nothing about Google Sheets so I do not know if it has a TEXTJOIN function nor if it even supports array formulas.

Give this array-entered** formula a try...
Excel Formula:
=TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH("English",B1:B20))*ISNUMBER(SEARCH("Swedish",C1:C7)),A1:A20,""))
**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself
 
Last edited:
Upvote 0
You could try the filter function, something on the basis of
Excel Formula:
=FormulaArray(FILTER(name list,ISNUMBER(SEARCH("English",source language list)),ISNUMBER(SEARCH("Swedish",target language list))))
 
Upvote 0
Solution
EDIT NOTE: I just noticed this question was being asked for Google Sheets... I know nothing about Google Sheets so I do not know if it has a TEXTJOIN function nor if it even supports array formulas.

Give this array-entered** formula a try...
Excel Formula:
=TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH("English",B1:B20))*ISNUMBER(SEARCH("Swedish",C1:C7)),A1:A20,""))
**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself
Hi Rick, it did not work as intended indeed. But thanks for the effort anyway!
 
Upvote 0
You could try the filter function, something on the basis of
Excel Formula:
=FormulaArray(FILTER(name list,ISNUMBER(SEARCH("English",source language list)),ISNUMBER(SEARCH("Swedish",target language list))))
This does work! Thanks a lot, that's awesome.

I do have a follow-up question, if I may, not sure if that's possible.
Can you make the "source language list" and "target language list" link to some sort of dropdown data validation or something else, so you can change it depending on the source/target language you need, so yet get different results? Without having to manually change the languages each time in the formula, to get a different result.
 
Upvote 0
This does work! Thanks a lot, that's awesome.

I do have a follow-up question, if I may, not sure if that's possible.
Can you make the "source language list" and "target language list" link to some sort of dropdown data validation or something else, so you can change it depending on the source/target language you need, so yet get different results? Without having to manually change the languages each time in the formula, to get a different result.
Sorry, link the actual language "English" and "Swedish" in your formula, not the language list... my bad.
 
Upvote 0
I used text strings as an example, you can use cell references instead.

I don't know if google sheets has data validation the same as excel, but if it does then it should work with that just fine.
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,044
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top