简体   繁体   English

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

[英]How to find the first cell with a specific value in each row?

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. 例如,列A将是雇员名称,列B将是经理级别1,列C将是经理级别2。 Some managers are certified, which will be indicated by their name - Brian (Certified) or Brian if not certified. 有些经理是经过认证的,并会以其姓名表示-布莱恩(Certified)或未认证的布莱恩。

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的结果如标题下所示:

在此处输入图片说明

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

暂无
暂无

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

相关问题 如何在每个单元格上方查找单元格的值 - How to find value of cell above each cell 如何在另一个工作表上查找单元格值,并将值放在找到第一个值的行的另一列上 - How to find a cell value on another worksheet and place a value on another column for the row where the first value was found 如何使用“FIND”作为第一行和最后一行来查看值,匹配值并将相邻单元格复制到另一个工作簿? - How to use "FIND" as a first and last row to look value at, to match value and copy adjacent cell to another workbook? Excel VBA-根据第一个单元格值作用于范围中的每一行 - Excel VBA - Act on each row in a range based on first cell value 在行中查找特定值并在水平相邻的单元格中查找值 - Lookup a specific value in a ROW & find the value in the horizontally adjacent cell 如何遍历一行数据,从该行的特定单元格中提取值,在另一行中找到它,然后在相交框中输入一个值 - How do I loop through a row of data, pull value from specific cell in that row, find it in another row, then enter a value in the intersecting box 在不是单元格引用的 Excel 数组的每一行或每一列中查找最大值 - Find maximum value in each row or column of an Excel array that is not a cell reference 在一行中找到第一个出现的值并返回其旁边的单元格 - Find the first occurrence of a value in a row and return cell next to it 仅当行包含特定值时,才能找到单元格数组的总和 - Find the sum of cell array, only if the row contains a specific value 搜索列中的每个单元格以查找特定值,并从该值所在的行中的另一个单元格复制值 - Search each cell in a column to find a certain value and copy value from another cell in the row the value is found in
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM