[英]Counting Duplicates in another column in Excel 2013
The outcome I am trying to achieve is illustrated in the image below. 下图显示了我要实现的结果。 Here is how I have set it up right now.
这是我现在设置的方式。
=COUNTIF($C:$C,C2)=1
. =COUNTIF($C:$C,C2)=1
。 The Task ID should be the corresponding Project code (from cell F) of the Project Name of the cell on the same row, but in column B, then a hyphen, then the 3 digit incremented code. How can I make it so the user does not have to enter the task ID. 我如何做到这一点,以便用户不必输入任务ID。 Instead, I want it to be automatically generated when the user selects the Project in column B.
相反,我希望当用户在B列中选择“项目”时自动生成它。
NOTE this should not affect the outcome, however, in my case, the Project Names and Project Codes for data validation are on another sheet 注意这不会影响结果,但是,就我而言,用于数据验证的项目名称和项目代码在另一页上
In B2 use, 在B2使用中,
=index(e:e, match(left(c2, 2), f:f, 0))
If your project codes are not always 2 characters but are separated from the extraneous information by a hyphen use, 如果您的项目代码并非始终为2个字符,而是通过连字符将其与无关信息分开,
=index(e:e, match(left(c2, find("-", c2&"-")-1), f:f, 0))
It appears I interpreted the lookup backwards. 看来我向后解释了查找。 To lookup the Task ID prefix from the Project Codes and supply an increment suffix use the following in C2,
要从项目代码中查找任务ID前缀并提供增量后缀,请在C2中使用以下代码,
=INDEX(F:F,MATCH(B2,E:E,0))&TEXT(COUNTIF(B$2:B2, B2), "-000")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.