After checking if a cell value exists in a column, I need to get the value of the cell next to the matching cell .
(在检查列中是否存在单元格值之后,我需要获取匹配单元格旁边的单元格的值 。)
For instance, I check if the value in cell A1
exists in column B
, and assuming it matches B5
, then I want the value in cell C5
. (例如,我检查cell A1
的值是否存在于column B
,并假设它与B5
匹配,那么我想要cell C5
的值。)
To solve the first half of the problem, I did this...
(要解决问题的前半部分,我这样做了......)
=IF(ISERROR(MATCH(A1,B:B, 0)), "No Match", "Match")
...and it worked.
(......而且它奏效了。)
Then, thanks to an earlier answer on SO , I was also able to obtain the row number of the matching cell: (然后,由于早先对SO的回答 ,我还能够获得匹配单元格的行号:)
=IF(ISERROR(MATCH(A1,B:B, 0)), "No Match", "Match on Row " & MATCH(A1,B:B, 0))
So naturally, to get the value of the next cell, I tried...
(很自然地,为了获得下一个细胞的价值,我试着......)
=IF(ISERROR(MATCH(A1,B:B, 0)), "No Match", C&MATCH(A1,B:B, 0))
...and it doesn't work.
(......它不起作用。)
What am I missing?
(我错过了什么?)
How do I append the column number to the row number returned to achieve the desired result? (如何将列号附加到返回的行号以获得所需的结果?)
ask by SNag translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…