简体   繁体   中英

Show image if rank equals number

I have a row of 5 cells. 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.

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).

Put this formula in place of header Image (above the header Rank ):

={
  "Image",
  ARRAYFORMULA(
    IMAGE(
      VLOOKUP(
        RANK(F3:J3, F3:J3),
        A2:B,
        2,
        0
      )
    )
  )
}

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM