鉴于列A包含目录路径,列B包含对这些路径的操作;如果特定字符串位于B列(每列A),我希望结果单元格包含特定字符串。
当然我可以对列进行排序,我相信我可以使用OFFSET
,但想知道如何找到单元格的结束索引,以便我可以搜索range
返回的OFFSET
}。
例如:
Path Operation
/share/Admins Accessed
/share/Admins Removed
/share/Admins Added
/share/Admins Changed
/share/Network Accessed
/shared/Projects Accessed
在这种情况下,我想在Path
中搜索唯一值(在本例中为/share/Admins
,/share/Network
和/shared/Projects
),并在Path
中给出此范围{1}},我想搜索相应的Operation
,如果存在与Removed
,Added
,Changed
相匹配的任何操作,我就会“ d将单元格值设为WRITE
;如果找不到这些值," READ"。
在这种情况下,我希望列(标题Result
)读取:
Path Operation Result
/share/Admins Accessed WRITE
/share/Admins Removed WRITE
/share/Admins Added WRITE
/share/Admins Changed WRITE
/share/Network Accessed READ
/shared/Projects Accessed READ
原谅SEO:我使用它来比较Varonis DatAdvantage报告01.a.01
(用户访问日志)和04.j.01
(有效用户权限报告)。遗憾的是,DatAdvantage并不认为需要编写与其用户活动记录和文件系统权限记录相关的报告。
答案 0 :(得分:1)
您可以使用Sumproduct。见截图。
=IF(SUMPRODUCT((A:A=A1)*((B:B="Removed")+(B:B="Added")+(B:B="Changed"))),"WRITE","READ")
或以较短的形式:
=IF(SUMPRODUCT((A:A=A1)*(B:B={"Removed","Added","Changed"})),"WRITE","READ")