简体   繁体   中英

Multiple criteria-based vlookup on google Sheets?

Can anyone point me towards how to do a multiple criteria text-based vlookup on Google Sheets?

I have columns that read CATEGORY, STUDENT NAME, SCORE. How can I get the SCORE if the CATEGORY is 'Creativity' and the STUDENT is 'xxx'? (The data isn't sorted and the first result found is fine!)

This seems like it should be really easy, but I can't see any solutions on here.

Thanks

Tardy

You could use the filter function :

FILTER(SCORE_column, CATEGORY_column = 'Creativity', STUDENT_column = 'xxx')

this will give you all students corresponding to that criteria, in case you have multiple students with the same name and you wish only the distinct entries then :

unique(FILTER(SCORE_column, CATEGORY_column = 'Creativity', STUDENT_column = 'xxx'))

I think I've found the answer. It was using a QUERY:

=QUERY($D$35:$J, "select I where D = '"&$M$34&"' And J = '"&$L35&"' ", 0)

This allows me to search for the text value in the cells m34 and l35 in columns I and J, respectively.

For anyone else struggling with this function, this University of York Google Doc is very helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM