简体   繁体   English

根据单元格值更改图像。 图像大于单个单元格 | 没有 VBA

[英]Change image based on cell value. Image is larger than a single cell | No VBA

I have cover sheet image that changes depending on the type of report it is.我有封面图片,它会根据报告的类型而变化。

I'd like the cover sheet image to automatically change, depending on a value selected in another cell.我希望封面图像自动更改,具体取决于在另一个单元格中选择的值。 I can think of ways to do this, but two issues:我可以想办法做到这一点,但有两个问题:

  • The cover sheet will be larger than a single cell封面将比单个单元格大

  • VBA is out, as we don't want these files to be .xlsm VBA 出来了,因为我们不希望这些文件是 .xlsm

Everything I know (and have found via Google) requires either VBA, or for the image to be contained within a single cell.我所知道的(并通过 Google 找到的)所有内容都需要 VBA,或者图像包含在单个单元格中。

The goal is to save 5 seconds + avoid user error.目标是节省 5 秒 + 避免用户错误。 So nothing huge...but any ideas?所以没什么大不了的……但是有什么想法吗?

Edit: First response got it - thanks编辑:第一个回复得到了 - 谢谢

Thanks,谢谢,

You're not restricted to using images which can fit "in" a cell (images always float over ranges, they're not contained in cells)您不限于使用可以“放入”单元格的图像(图像总是浮动在范围内,它们不包含在单元格中)

Eg: see screenshot of a simple setup using a 5x2 range for each picture.例如:查看每个图片使用 5x2 范围的简单设置的屏幕截图。

There is a named range "PIC_HERE" defined as:有一个命名范围“PIC_HERE”定义为:

=OFFSET(Sheet1!$F$1,MATCH(Sheet1!$A$4,Sheet1!$E:$E,0)-1,0,5,2)

MATCH() finds the offset for each image, and the last two arguments to OFFSET() return a 5x2 range MATCH()找到每个图像的偏移量, OFFSET()的最后两个参数返回一个 5x2 范围

The image at B4 is a linked picture with formula =PIC_HERE B4 处的图片是一个链接图片,公式=PIC_HERE

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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