[英]How can I find the closest matching value ABOVE the current cell, and return a different column in that same row?
Working in google sheets, I am trying to find the closest matching value ABOVE the current cell and return a different column from that same row.在谷歌表格中工作,我试图找到当前单元格上方最接近的匹配值,并从同一行返回不同的列。
Here is a visual of what I'm trying to achieve:这是我试图实现的目标的视觉效果:
For any row where Column A=x, just return the value in Column B to Column "Results".对于列 A=x 的任何行,只需将列 B 中的值返回到列“结果”。 If Column A does not equal x, I want to return the closest (in distance) Column B value where Column A=x above the current row.
如果 A 列不等于 x,我想返回最接近(距离上)的 B 列值,其中 A 列 = x 在当前行上方。 The first part (where Column A=x) is simple, but I'm having trouble with the second part, where Column A <> x.
第一部分(其中 A 列 = x)很简单,但我在第二部分遇到了麻烦,其中 A 列 <> x。 I've tried various iterations of index match, vlookup, but I keep ending up with either the first or last match, rather than the closest (in distance) above.
我已经尝试了索引匹配、vlookup 的各种迭代,但我一直以第一个或最后一个匹配结束,而不是上面最近的(距离上)。
Thank you so much!非常感谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.