简体   繁体   English

智能Excel过滤和复制

[英]Intelligent excel filtering and copying

I'm looking for a solution for the following problem. 我正在寻找以下问题的解决方案。 Sports analytics stuff. 体育分析资料。

Sheet 1: ~3000 rows, 4 columns, namely down, distance, position, Expected Points (EP). 表格1:〜3000行,4列,即向下,距离,位置,预期点(EP)。
Sheet 2: ~1500 rows, 4 columns, namely down, distance, position, and an EMPTY EP column. 表格2:约1500行,4列,即向下,距离,位置和EMPTY EP列。

What I want from a function or filter: checks Sheet 2 values for the first 3 columns, searches for the exact match in Sheet 1, and then takes the EP value from Sheet 1 for the corresponding row, and copies it to Sheet 2 empty EP cell for the row with equivalent values. 我从功能或过滤器中得到的是:检查前3列的工作表2值,在工作表1中搜索完全匹配,然后从工作表1中获取对应行的EP值,然后将其复制到工作表2空EP具有等效值的行的单元格。

Example: 2, 15, 39 in Sheet 2. Checks the exact row on Sheet 1, where values are 2, 15, 39, some EP. 例如:工作表2中的2、15、39。检查工作表1上的确切行,其中值是2、15、39,有些EP。 Then takes the EP, and copies it to Sheet 2 EP column in the row I'm working with. 然后获取EP,并将其复制到我正在处理的行的Sheet 2 EP列中。

Does someone have any advice? 有人有什么建议吗? Thinking about advanced filters, vlookup with nested ifs and ands, but no solution for the exact problem popped into my mind. 考虑高级过滤器,带有嵌套的if和ands的vlookup,但我没有想到确切的解决方案。

Here's a simple solution 这是一个简单的解决方案

  1. Insert a column on the left of all the data on Sheet2 在Sheet2上所有数据的左侧插入一列
  2. enter the formula =concatenate(B2,C2,D2) in row 2 if you have headings 如果您有标题,请在第2行中输入公式= concatenate(B2,C2,D2)
  3. Auto fill down to the end of your data 自动填充到数据末尾
  4. On sheet1 Empty EP column enter on row 2 =iferror(vlookup(A2&B2&C2,Sheet2!A:E,false,5),"") 在sheet1空EP列上,在第2行上输入=iferror(vlookup(A2&B2&C2,Sheet2!A:E,false,5),"")
  5. auto fill down to the end of your data. 自动填充到数据末尾。

You should now have the matching data in the column. 现在,您应该在列中具有匹配的数据。

It is possible to do the lookup without creating the extra column but it's much easier if you do create that lookup column. 可以在不创建额外列的情况下进行查找,但是如果您确实创建了该查找列,则要容易得多。

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

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