Excel:结合半重复logging(不同的列)?

如果指定的列是相同的,我将如何组合logging?

以下是我的所得,以及我正在寻找的结果:

在这里输入图像说明

这可以使用数组公式来完成,如果你不介意它们又大又丑。 这个例子应该做你想要的。 在重复条目的情况下,它只需要最后一个定义的值(程序员凯文·莫斯,而不是程序员):

示例工作簿

在C11和D11中input以下公式,然后按CTRL + SHIFT + ENTER应用数组公式。 然后可以根据需要将公式复制到下面的行。

= INDEX((IF((((($ A11 = $ A $ 2:$ A $ 7)+($ B11 = $ B $ 2:$ B $ 7))= 2)+(C $ 2:C $ 7 <> “”) )= 2,C $ 2:C $ 7, “”)),MAX(IF((IF((((($ A11 = $ A $ 2:$ A $ 7)+($ B11 = $ B $ 2:$ B $ 7) )= 2)+(C $ 2:C $ 7 <> “”))= 2,C $ 2:C $ 7, “”))<> “”,ROW($ A $ 1:$ A $ 6),0)))

这打破了一点点的发生,但不可否认,它仍然是不透明的,对不起:

=INDEX( (IF( # This IF statement collects all entries in a data field for a given Fname/Lname combination (((($A11=$A$2:$A$7) + ($B11=$B$2:$B$7))=2) + (C$2:C$7<>""))=2, # Checks that First and Last Name Match, and Data field isn't empty C$2:C$7, # Return data field if TRUE "" # Return empty if FALSE )), MAX( # Take the highest index number, use it to select a row from the result of the IF statement above IF(( # This IF statement returns an index number if the data field isn't empty IF( # This IF statement collects all entries in a data field for a given Fname/Lname combination (copied from above) (((($A11=$A$2:$A$7)+($B11=$B$2:$B$7))=2)+(C$2:C$7<>""))=2, C$2:C$7, "") )<>"", # End of conditional statement ROW($A$1:$A$6), # Value if TRUE (ROW used as an incrementing counter) 0 # Value if FALSE (0 will be ignored in the MAX function that uses this result) ) ) )