[英]What is the formula for displaying a value if another value is in the same row in Excel?
I am trying to create a formula that populates the Location # value of the person that is in the same row and only if the person is in the Location Manager or the Assistant Location Manager columns.我正在尝试创建一个公式,该公式填充同一行中人员的位置 # 值,并且仅当该人员位于“位置管理器”或“助理位置管理器”列中时。 The screenshots show two different tabs of information.
屏幕截图显示了两个不同的信息选项卡。 I am trying to populate the Location# cell in the first screenshot.
我正在尝试填充第一个屏幕截图中的 Location# 单元格。 Data will be pulled from the second screenshot.
数据将从第二个屏幕截图中提取。 The formula should populate COL-04 for Jane Doe and COL-01 for John Doe.
该公式应为 Jane Doe 填充 COL-04,为 John Doe 填充 COL-01。 If they aren't in the two columns, then the cell should stay blank (" ").
如果它们不在两列中,则单元格应保持空白 (" ")。 I hope I explained things clear enough.
我希望我把事情解释得足够清楚。 Thanks
谢谢
[ [
IfError is not working properly. IfError 工作不正常。
Assuming both the data starts from A1 and the LOCATION DATA sheet is named Sheet1, this should return the correct values:假设两个数据都从 A1 开始,并且 LOCATION DATA 表被命名为 Sheet1,这应该返回正确的值:
=IFERROR(IFERROR(INDEX(Sheet1!A:A,MATCH(B1,Sheet1!C:C,0)),INDEX(Sheet1!A:A,MATCH(B1,Sheet1!D:D,0))),"")
Formula not tested, might be missing a bracket or comma:公式未经测试,可能缺少括号或逗号:
=IF(B1=" ","",IFERROR(IFERROR(INDEX(Sheet1!A:A,MATCH(B1,Sheet1!C:C,0)),INDEX(Sheet1!A:A,MATCH(B1,Sheet1!D:D,0))),""))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.