如何在每一行中找到第一个具有特定值的单元格?

时间:2022-01-06 22:16:01

I am looking for a formula or macro that will return the first cell in which a specified value occurs by row. For example, Column A would be EMPLOYEE NAME, Column B would be MANAGER LEVEL 1, Column C would be MANAGER LEVEL 2.... so on. Some managers are certified, which will be indicated by their name - Brian (Certified) or Brian if not certified.

我正在寻找一个公式或宏,它将返回第一个单元格,其中指定的值按行出现。例如,列将员工姓名,列B是经理级别1,列C将经理级别2 ....等等。有些经理是有认证的,如果没有认证,就用他们的名字——Brian(认证)或者Brian(认证)。

Using the above example, I want to find the lowest level manager who is certified for each employee. That is, ColumnF results as shown under the header:

使用上面的示例,我希望找到为每个员工认证的最低级别经理。也就是说,ColumnF结果如header下面所示:

如何在每一行中找到第一个具有特定值的单元格?

1 个解决方案

#1


1  

Function findCertified(row As Integer)
    findCertified = Sheet1.Rows(row).Find("(Certified)").Value
End Function

#1


1  

Function findCertified(row As Integer)
    findCertified = Sheet1.Rows(row).Find("(Certified)").Value
End Function