vlookup multiple returns excel

妖精的绣舞 提交于 2019-12-13 07:51:43

问题


I am working with a data set of students information at a local university.

I used a VLOOKUP, using the IDs of the students as the unique identifier. But my problem is that the VLOOKUP only requires one row of information and half of the students in the study have more than 5 lines each. How can I make EXCEL return multiple lines?


回答1:


VLookup will return the first row matching or closely matching the condition depending on the last boolean function parameter. It is assumed that the ID is unique and not repeated several times in the table you are searching in.

As far as I understand the issue, either you find a way to make a unique key for the lookup table so a key loking like 'ID + another column' formatted in a unique way such as 'ID - Other ID' or you will have to use VBA to retrieve all the rows matching a certain non unique condition.

If the job at hand is small, or VBA cannot be considered, and it is acceptable to work it out manually using auto Filters to do the matching/retrieving could help.




回答2:


If I understand correctly your issue: have you tried playing with VLOOKUP([range_lookup] = TRUE/FALSE) ?

If not, I'd guess your best bet would be to Create a unique, combined ID for each student. Try posting a reproducible example :)




回答3:


You need to short duplicate entries into two separate column, and look in to both column.

I did that if you have logical though, you can do it.



来源:https://stackoverflow.com/questions/17702734/vlookup-multiple-returns-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!