简体   繁体   English

如何在Excel中搜索和合并多个工作表?

[英]How to search and combine several sheets in Excel?

I am trying to do an Excel sheet to do some statistics about athletes in world cup competitions. 我正在尝试制作一张Excel工作表,以对世界杯比赛中的运动员进行一些统计。

I have a worksheet on excel for every competition, plus one for the overall result after the season (which thus has a list of every athlete that competed at least once). 我为每场比赛都有一张关于excel的工作表,另外还有一份有关本赛季结束后整体成绩的工作表(因此,该表列出了至少参加过一次比赛的每位运动员的名单)。

The worksheets have the name of the location where the competition happened. 工作表中包含比赛发生地点的名称。 Eg: PARIS. 例如:巴黎。

I have one more sheet, named "Athletes". 我还有一张名为“运动员”的表。 what I want to do there is: for every athlete appearing in the "overall" list, I want the columns after the name to be filled with the results in every location the athlete completed in. 我想做的是:对于出现在“总体”列表中的每个运动员,我希望在名字后面的列中填写运动员完成的每个位置的结果。

For example 例如

Name Paris London LA Berlin 名字巴黎伦敦LA柏林

Amoros 1 5 / 7 阿莫罗斯1 5/7

Bilboni 2 43 3 12 Bilboni 2 43 3 12

To find "1", I want excel to search the sheet "Paris" for "Amoros" and extract the ranking in the row it finds "Amoros". 要找到“ 1”,我希望Excel在工作表“ Paris”中搜索“ Amoros”,并提取找到“ Amoros”的行中的排名。

Let's say it finds "Amoros" in cell L57, then the corresponding ranking to extract will be in K57. 假设它在单元格L57中找到“ Amoros”,则要提取的相应排名将在K57中。 "/" indicates Amoros didn't compete in LA. “ /”表示Amoros没有参加洛杉矶比赛。

I am using Excel 2016 on a Mac. 我在Mac上使用Excel 2016。

Thanks a lot in advance! 在此先多谢!

Ben

If you data is set up starting in A1 you would use INDEX/MATCH with INDIRECT to set the sheet: 如果数据是从A1开始设置的,则可以使用INDEX / MATCH和INDIRECT来设置工作表:

=IFERROR(INDEX(INDIRECT("'" & B$1 & "'!$K:$K"),MATCH($A1,INDIRECT("'" & B$1 & "'!$L:$L"),0)),"/")

This formula would go in B2 and be copied over and down the dataset. 该公式将在B2中使用,并在数据集中上下复制。

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

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