Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9787

google sheets return cells if match in multiple columns

$
0
0

https://docs.google.com/spreadsheets/d/1PvGWPsBZ3NsqlVWVlmJaoP5kPKc01KM8knOSYMdU2dM/edit?usp=sharing

I have multiple columns of names (stocks from googlefinance) and if there is a match across the columns I need to return only the matches into a new column. I need to be able to do this for both two matches and three matches across the columns.

I have a sample google sheet above with sample columns and desired returns for illustration.

I have tried the following functions COUNTIF VLOOKUP QUERY, I cannot figure out how to search across all possibilities.

=IF(COUNTIF($B:$E, $A2:$A20)>0, $A2:$A20,""), returns only one match from the first column

=VLOOKUP($A2:$A20,$B2:$E50,1,true) only returns one match as well, the data isn't sorted and if I use false I get no results.

=QUERY($A2:$E50, "select A where A matches B:E label A 'Multis'" ) only returns results if they are in the corresponding cells i.e., A3=C3, not A3=C4

none of these can look to see if column B matches column C. If I could get any of these to work I could nest searches A, B:E; B, C:E; C, D:E; D, E; then concatenate the results and delete repeats. I have not been able to get the A, B:E to work correctly.


Viewing all articles
Browse latest Browse all 9787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>