简体   繁体   中英

Replace VLookup Values with VLookup Images (Google Sheets)

Afternoon everyone! Before reading, I'd review the example sheet.

I'm struggling with a line of code, where it will allow me to replace the value in a cell that is found using VLookup with a picture.

Link to example sheet: https://docs.google.com/spreadsheets/d/1hL0KbRSf2MHFwDOgjERP_iayXgfOIR0lMtz0p7YfFs4/edit?usp=sharing

The dilemma

I'm using Vlookup to find a value on "Sheet3" and to place the percent value in a particular cell on "Sheet1" (No issues there). Once the correct value is found, I want to Vlookup the correct image to that cell that corresponds with the percent value.

Things to keep in mind.

  • I cannot alter "Sheet3" in any way.
  • I can only alter "Sheet1" and "Images"

Here is the formula I'm currently using to find the correct value:

=iferror(VLOOKUP($E7, Sheet3!$B$16:AC, 10, False), " ")

Here is the formula I'm using to try and find the image:

=IF(VLOOKUP($E6, Sheet3!$B$16:AC, 10, False)=ISBETWEEN(VLOOKUP($E6, Sheet3!$B$16:AC, 10, False),24%,26%), VLOOKUP($H6, Images!$A1, 1, False)," ")

What I want

If the "SKU" value ($E6) is found on "Sheet3", find the percent value on column $K (on "Sheet3") linked to that "SKU", and show the correct image on "Sheet1" on cell ($H6) if the percent value is between 24%-26%. If the statement is false then the cell will just show up blank (" ").

Thanks in advance!

change Images sheet to:

在此处输入图像描述

then use:

=IFERROR(VLOOKUP(IFERROR(ROUND(
 VLOOKUP($E6, Sheet3!$B$16:AC, 10, 0), 2)), Images!A:B, 2, 1))

在此处输入图像描述

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