[英]Get the value of the adjacent cell if a cell contains a specific string
I'm looking for a formula that would get me the value of the adjacent cell if any cell in the row matches the word "fizz" exactly.我正在寻找一个公式,如果行中的任何单元格与单词“fizz”完全匹配,它会为我提供相邻单元格的值。
This is what my spreadsheet looks like:这是我的电子表格的样子:
1 |
2 |
3 | fizz
4 |
5 | buzz
6 | fizz
7 |
and I'm looking for a formula that would return an array or a list similar to this if I searched for fizz我正在寻找一个公式,如果我搜索 fizz,它会返回一个类似于此的数组或列表
3
6
You may try:您可以尝试:
• Formula in F2
: •
F2
中的公式:
=FILTER(A2:A8,$D$2=B2:B8,"None")
Or, for those who already have TAKE() may try:或者,对于那些已经拥有TAKE()的人可以尝试:
=FILTER(TAKE(A2:B8,,1),D2=B2:B8)
Or, for those who are using earlier versions may try:或者,对于那些使用早期版本的人可以尝试:
=IFERROR(INDEX($A$2:$A$8,
AGGREGATE(15,6,(ROW($A$2:$A$8)-ROW($A$2)+1)/
($D$2=$B$2:$B$8),ROW(A1))),"")
The above may need to press CTRL
+ SHIFT
+ ENTER
depending on your Excel Versions!以上可能需要按
CTRL
+ SHIFT
+ ENTER
取决于你的 Excel 版本!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.