[英]Excel “Insert shapes” Color change based on cell value
Anyone knows how to Change the color of Shapes("Insert-> Shapes") based on the value of a cell. 任何人都知道如何根据单元格的值更改Shapes(“ Insert-> Shapes”)的颜色。 i could do this with the help of macro.
我可以借助宏来做到这一点。 but i now need the same to be done without the help of macro.
但是我现在需要在没有宏帮助的情况下完成同样的操作。
Kindly share the formula if anyone can do this. 如果有人可以的话,请分享公式。
thanks. 谢谢。
Example how to show the picture of a named range in a ActiveX image control: 示例如何在ActiveX图像控件中显示命名范围的图片:
to do so: 这样做:
=INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+1):INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+4)
=INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+1):INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+4)
now: 现在:
=EMBED(...)
in the formula bar with =Image
(the name of the named range). =Image
(命名范围的名称=EMBED(...)
覆盖公式栏中的公式=EMBED(...)
)。 Now, if you change the value in Sheet1!A1
, you should see the cells E[n]:E[m]
with n=A1*4+1
and m=A1*4+4
as picture in the Image Control. Sheet1!A1
的值,则应在图像控件中看到单元格E[n]:E[m]
其中n=A1*4+1
和m=A1*4+4
。 Try it by putting values in E1:E20
and change A1
. E1:E20
并更改A1
尝试。 E1:E4, E5:E8, E9:E12,...
you see them in the Image Control by changing the value in A1
. E1:E4, E5:E8, E9:E12,...
可以通过更改A1
的值在图像控件中看到它们。
Edit April 2019: 编辑2019年4月:
This works using Excel 2007
. 这可以在
Excel 2007
使用。 It does not work in later Excel versions
because the ActiveX Image control does not more accept cell ranges as source. 它不能在更高的
Excel versions
因为ActiveX Image控件不再接受单元格区域作为源。
Just tested in Excel 365
: 刚刚在
Excel 365
进行了测试:
First do the same steps as above but then in last step 首先执行与上述相同的步骤,然后在最后一步
now: 现在:
A1:A4
for example) into the clipboard. A1:A4
)复制到剪贴板中。 It is not important from where the cells are coming. Home -> Paste -> Linked Picture
. Home -> Paste -> Linked Picture
。 A picture showing the copied cells is pasted. =Sheet1!$A$1:$A$4
for example. =Sheet1!$A$1:$A$4
。 =Image
(the name of the named range). =Image
(命名范围的名称)覆盖公式栏中的公式。 Now, if you change the value in Sheet1!A1
, you should see the cells E[n]:E[m]
with n=A1*4+1
and m=A1*4+4
as picture in the pasted picture. Sheet1!A1
的值,则应将粘贴的图片中的n=A1*4+1
和m=A1*4+4
的单元格E[n]:E[m]
看到。 Try it by putting values in E1:E20
and change A1
. E1:E20
并更改A1
尝试。 E1:E4, E5:E8, E9:E12,...
you see them in the pasted picture by changing the value in A1
. E1:E4, E5:E8, E9:E12,...
可以通过更改A1
的值在粘贴的图片中看到它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.