简体   繁体   English

如果另一个值在 Excel 中的同一行中,则显示值的公式是什么?

[英]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.

相关问题 Excel公式:对于列中值的每个实例,获取同一行中另一列的值 - Excel formula: For each instance of value in column, get value of another column in same row 公式,以获取列中的最后一个值,然后获取同一行中另一个单元格的值 - Formula to get last value in columns then value of another cell in the same row Excel公式在同一行中输入绿色单元格的数值 - Excel Formula to type in numeric value of green cells in the same row 计算Excel-VBA中另一个值的同一行中的关联值 - Counting the associated value in the same row of another value in Excel-VBA Excel中的Applescript查找值,然后在同一行中查找另一个值 - Applescript in Excel to find a value and then look for another value in the same row 将 excel 公式值(动态)与相同值排序 - Sorting excel formula value (Dynamic) with same value 如何在excel中创建一个公式来搜索行中的值,然后从该列中的另一个单元格中获取值? - How do I create a formula in excel that searches for a value in row, and then takes the value from another cell in that column? Excel公式将行中的值移动到列 - excel formula to move value in a row to column Excel公式Vlookup通过引用行和列的值 - Excel Formula Vlookup the value by referring Row and Column Excel公式获取第n行上的表值 - Excel formula to get table value on nth row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM