【问题标题】:Use the Index and Match functions to return a specific cell that contains a key word "VAC"使用索引和匹配函数返回包含关键字“VAC”的特定单元格
【发布时间】:2021-04-15 22:47:38
【问题描述】:
=INDEX('[IHT Schedule 2020.xlsx]Jan - Dec  2021'!$L$18:$AP$79,MATCH($B10,'[IHT Schedule 2020.xlsx]Dec 2020'!$C$18:$C$79,0),MATCH(V$8,'[IHT Schedule 2020.xlsx]Jan - Dec  2021'!$L$17:$AP$17,0))

公式有效并返回:10.5 VACIHT Schedule2020.xlsx 完美。

但我还有其他可能包含7:30-5:30 am、或“off”或UED的单元格。我希望这个公式搜索并只返回“10.5 VAC”值。

我的问题是用这个公式可以做到这一点,还是我应该用不同的方式做这个?

【问题讨论】:

  • 请张贴您的数据截图。

标签: excel search indexing match


【解决方案1】:

检查您的结果中是否有文本“VAC”,如果没有找到则将其丢弃。

=if(isnumber(find("VAC",your formula)),your formula,"")

如果你有 Office 365 许可证,你可以使用新的 LET() 函数来避免冗长公式的重复

=let(TheResult,your formula,if(isnumber(find("VAC",TheResult)),TheResult,""))

your formula 替换为您在问题中发布的公式,省略前导= 符号。

【讨论】:

  • 如果解决了您的问题,请按照tour 中的说明标记答案。如果没有,请发表评论,以便我跟进。
  • 谢谢 Teylyn,非常感谢。我很抱歉地问,但如果我想要多个标准,比如“VAC”和“ABSENCE”,这看起来合适吗? =if(isnumber(find("VAC",your formula)),your formula,if(isnumber(find("ABSENT",your formula)),your formula,""))
  • 您可以像这样使用 OR() 函数:=if(or(isnumber(find("VAC",your formula)),isnumber(find("VAC",your formula))),your formula,"")
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-11-22
  • 2023-03-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-24
相关资源
最近更新 更多