简体   繁体   English

在Excel中搜索并返回多行

[英]Search and return multiple rows in excel

This is my problem. 这是我的问题。 I have a spreadsheet containing alot of data. 我有一个包含大量数据的电子表格。 What I want to do is create a way that I can search for a recurring name, and return all the information (rows) associated to it. 我要做的是创建一种搜索重复名称的方法,并返回与其相关的所有信息(行)。 Here is a mini example below: 以下是一个迷你示例:

A    B      C        D          E        F

ID   Name   Date     Client ID  Balance  Owed

100  Tom    1/11/11  256        300      200
100  Tom    1/12/11  565        500      150
100  Tom
200  Jay
200  Jay
300  Frank
100  Tom
100  Tom
400  Ted

You get the idea (I hope). 您明白了(我希望)。 So what I want to do on another sheet is search for "Tom" and get it to return ALL instances of Tom in the Name column and return the data in the rows associated to Tom. 因此,我想在另一张纸上进行的操作是搜索“ Tom”,并使其返回“名称”列中Tom的所有实例,并返回与Tom关联的行中的数据。 So I would get back 5 results of Tom with all the necessary information. 因此,我将获得Tom的5个结果以及所有必要的信息。 Thanks in advance! 提前致谢!

B

您是否尝试过在Excel中找到“数据透视表”选项,如果您只需要查找一些重复项,可能无需任何编码即可为您提供帮助

Could just apply a filter to the data and have the user select their name from column B. No need to copy data this way, so the update issue goes away. 可以仅对数据应用过滤器,并让用户从B列中选择其名称。无需以这种方式复制数据,因此更新问题就消除了。 (probably best to delete the blank row below the heading row first) (最好先删除标题行下方的空白行)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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