[英]Show image if rank equals number
I have a row of 5 cells.我有一排 5 个单元格。 I want to show an image above each cell depending on the rank of the cell.
我想根据单元格的等级在每个单元格上方显示一个图像。 So if the rank of the cell equals 1, show a specific image (from a link), if the rank is 2, show a different image, and so on.
因此,如果单元格的等级等于 1,则显示特定图像(来自链接),如果等级为 2,则显示不同的图像,依此类推。
Here is what my sheet looks like now:这是我的工作表现在的样子:
+-------+------+------+------+------+------+
| Image | | | | | |
+-------+------+------+------+------+------+
| Score | 100 | 300 | 200 | 500 | 400 |
+-------+------+------+------+------+------+
How would I achieve this?我将如何实现这一目标?
Assuming you have a table with rank numbers and corresponding image URLs (columns A:B
im my example).假设您有一个包含排名数字和相应图像 URL 的表格(列
A:B
,我的示例)。
Put this formula in place of header Image (above the header Rank ):用这个公式代替 header图像(高于 header等级):
={
"Image",
ARRAYFORMULA(
IMAGE(
VLOOKUP(
RANK(F3:J3, F3:J3),
A2:B,
2,
0
)
)
)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.