Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can i insert a picture with a if statement

3,854 views
Skip to first unread message

nivek05

unread,
Jun 2, 2008, 1:58:00 AM6/2/08
to
I have 2 pictures but only want to display one dependant on what infomation
is in cell a1 is this possible using a IF statement??

Gord Dibben

unread,
Jun 2, 2008, 5:36:30 PM6/2/08
to
Not with a formula.

See John McGimpsey's site for a method using a Data Validation dropdown to
select an item which inserts a picture.

http://www.mcgimpsey.com/excel/lookuppics.html


Gord Dibben MS Excel MVP

On Sun, 1 Jun 2008 22:58:00 -0700, nivek05 <niv...@discussions.microsoft.com>
wrote:

mahiribrahim

unread,
Nov 20, 2009, 5:51:30 AM11/20/09
to
Hi,

I have 3 pictures but only want to display one dependant on what infomation


is in cell a1 is this possible using a IF statement??

nivek0 wrote:

can i insert a picture with a if statement
02-Jun-08

I have 2 pictures but only want to display one dependant on what infomation
is in cell a1 is this possible using a IF statement??

Previous Posts In This Thread:

On Monday, June 02, 2008 1:58 AM
nivek0 wrote:

can i insert a picture with a if statement


I have 2 pictures but only want to display one dependant on what infomation
is in cell a1 is this possible using a IF statement??

On Monday, June 02, 2008 5:36 PM
Gord Dibben wrote:

Not with a formula.
Not with a formula.

See John McGimpsey's site for a method using a Data Validation dropdown to
select an item which inserts a picture.

http://www.mcgimpsey.com/excel/lookuppics.html


Gord Dibben MS Excel MVP

On Sun, 1 Jun 2008 22:58:00 -0700, nivek05 <niv...@discussions.microsoft.com>
wrote:

EggHeadCafe - Software Developer Portal of Choice
Forms Auth: Membership, Roles and Profile with no Providers and no Session
http://www.eggheadcafe.com/tutorials/aspnet/33d4018a-03cf-48aa-9b68-82ba27aa6af9/forms-auth-membership-r.aspx

MRT

unread,
Nov 21, 2009, 9:49:10 PM11/21/09
to
One way (event macro - free) … # based on Excel 2003

1. on the Sheet2,
2. Select the cell A1 , Press Alt > i > p > f, and select the picture-1.
3. Adjust the cell A1 size to fit the picture-1.
4. Still selecting the cell A1 condition, press Alt > o > c > w > Enter, select B1:D1, Alt > e > r.
5. Select the cell B1 , Press Alt > i > p > f, and select the picture-2.
6. If needed, adjust the picture-2 size to fit the cell B1.
7. Select the cell C1 , Press Alt > i > p > f, and select the picture-3.
8. If needed, adjust the picture-3 size to fit the cell C1.
9. Select again the cell A1, press Alt > i > n > d, type the name "pic_01", and then click Add > OK.
10. Select again the cell B1, press Alt > i > n > d, type the name "pic_02", and then click Add > OK.
11. Select again the cell C1, press Alt > i > n > d, type the name "pic_03", and then click Add > OK.
12. Select the cell D1, press Alt > i > n > d, type the name "pic_04", and then click Add > OK.
13. Select again the cell A1, press Alt > e > c.
14. move to the Sheet1,
15. Select the cell what you want to display the picture, *hold down Shift key* and press Alt > e > n.
16. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter.
17. Press Alt > i > n > d, type the name "pic_00" In the Apply names box,
18. In the "Refers to" box, type or paste following formula
=IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04)))
and then click Add > OK.
19. Now, try to input 1, 2, 3 or others in the cell A1.

HTH
--
MRT


<mahir ibrahim> wrote in message news:2009112055...@yahoo.com...

richardroberts

unread,
Dec 15, 2009, 6:23:35 AM12/15/09
to
How can this be done in Excel 2007?

MRT wrote:

One way (event macro - free) �憶㍊阮⑯�
������銓�轣竰��胙繞��… # based on Excel 2003

1. on the Sheet2,
2. Select the cell A1 , Press Alt > i > p > f, and select the picture-1.
3. Adjust the cell A1 size to fit the picture-1.
4. Still selecting the cell A1 condition, press Alt > o > c > w > Enter, select B1:D1, Alt > e > r.
5. Select the cell B1 , Press Alt > i > p > f, and select the picture-2.
6. If needed, adjust the picture-2 size to fit the cell B1.
7. Select the cell C1 , Press Alt > i > p > f, and select the picture-3.
8. If needed, adjust the picture-3 size to fit the cell C1.
9. Select again the cell A1, press Alt > i > n > d, type the name "pic_01", and then click Add > OK.
10. Select again the cell B1, press Alt > i > n > d, type the name "pic_02", and then click Add > OK.
11. Select again the cell C1, press Alt > i > n > d, type the name "pic_03", and then click Add > OK.
12. Select the cell D1, press Alt > i > n > d, type the name "pic_04", and then click Add > OK.
13. Select again the cell A1, press Alt > e > c.
14. move to the Sheet1,
15. Select the cell what you want to display the picture, *hold down Shift key* and press Alt > e > n.
16. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter.
17. Press Alt > i > n > d, type the name "pic_00" In the Apply names box,
18. In the "Refers to" box, type or paste following formula
=IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04)))
and then click Add > OK.
19. Now, try to input 1, 2, 3 or others in the cell A1.

HTH
--
MRT

Previous Posts In This Thread:

On Monday, June 02, 2008 1:58 AM
nivek0 wrote:

can i insert a picture with a if statement
I have 2 pictures but only want to display one dependant on what infomation
is in cell a1 is this possible using a IF statement??

On Monday, June 02, 2008 5:36 PM
Gord Dibben wrote:

Not with a formula.
Not with a formula.

See John McGimpsey's site for a method using a Data Validation dropdown to
select an item which inserts a picture.

http://www.mcgimpsey.com/excel/lookuppics.html


Gord Dibben MS Excel MVP

On Sun, 1 Jun 2008 22:58:00 -0700, nivek05 <niv...@discussions.microsoft.com>
wrote:

On Friday, November 20, 2009 5:51 AM
mahir ibrahim wrote:

Insert pictures
Hi,

I have 3 pictures but only want to display one dependant on what infomation
is in cell a1 is this possible using a IF statement??

On Saturday, November 21, 2009 9:49 PM
MRT wrote:

One way (event macro - free) �������銓�轣竰��胙繞��… # based on Excel 2003

1. on the Sheet2,
2. Select the cell A1 , Press Alt > i > p > f, and select the picture-1.
3. Adjust the cell A1 size to fit the picture-1.
4. Still selecting the cell A1 condition, press Alt > o > c > w > Enter, select B1:D1, Alt > e > r.
5. Select the cell B1 , Press Alt > i > p > f, and select the picture-2.
6. If needed, adjust the picture-2 size to fit the cell B1.
7. Select the cell C1 , Press Alt > i > p > f, and select the picture-3.
8. If needed, adjust the picture-3 size to fit the cell C1.
9. Select again the cell A1, press Alt > i > n > d, type the name "pic_01", and then click Add > OK.
10. Select again the cell B1, press Alt > i > n > d, type the name "pic_02", and then click Add > OK.
11. Select again the cell C1, press Alt > i > n > d, type the name "pic_03", and then click Add > OK.
12. Select the cell D1, press Alt > i > n > d, type the name "pic_04", and then click Add > OK.
13. Select again the cell A1, press Alt > e > c.
14. move to the Sheet1,
15. Select the cell what you want to display the picture, *hold down Shift key* and press Alt > e > n.
16. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter.
17. Press Alt > i > n > d, type the name "pic_00" In the Apply names box,
18. In the "Refers to" box, type or paste following formula
=IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04)))
and then click Add > OK.
19. Now, try to input 1, 2, 3 or others in the cell A1.

HTH
--
MRT


Submitted via EggHeadCafe - Software Developer Portal of Choice
JQuery and partial views in an ASP.NET MVC application
http://www.eggheadcafe.com/tutorials/aspnet/a8081c04-776d-4322-b403-84508b0ae3b5/jquery-and-partial-views.aspx

MRT

unread,
Dec 15, 2009, 12:33:50 PM12/15/09
to
Hi Richard,

1. on the Sheet2,
2. Select the cell A1 , insert picture-1.
http://office.microsoft.com/en-us/excel/HA100794091033.aspx#4


3. Adjust the cell A1 size to fit the picture-1.

4. Adjust the cell B1 to D1 size same as the cell A1.
5. Insert the picture-2 & 3 into the cell B1 & C1 in the same way.
6. If needed, adjust the picture-2 & 3 size to fit the cell B1 & C1.
7. Select again the cell A1, define the name as "pic_01".
<http://office.microsoft.com/en-us/excel/HA101471201033.aspx?pid=CH100648431033#Create a name by using the Create Name dialog
box>
8. Select again the cell B1, define the name as "pic_02" in the same way.
9. Select again the cell C1, define the name as "pic_03" in the same way.
10. Select the cell D1, define the name as "pic_04".
11. Select again the cell A1, and copy.
12. move to the Sheet1,
13. Select the cell that you want to display the picture, paste picture as link.
http://office.microsoft.com/en-us/excel/HP102541221033.aspx?pid=CH100675631033#2
14. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter.
15. Define the name as "pic_00" In the Apply names box,
<http://office.microsoft.com/en-us/excel/HA101471201033.aspx?pid=CH100648431033#Create a name by using the Create Name dialog
box>
16. and in the "Refers to" box, type or paste following formula
=IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04)))
17. Now, try to input 1, 2, 3 or others in the cell A1 in Sheet1.

HTH
--
MRT

<Richard Roberts> wrote in message news:2009121562332...@tiscali.co.uk...

> How can this be done in Excel 2007?
>
>
>
> MRT wrote:
>

> One way (event macro - free) ... # based on Excel 2003

hussei...@gmail.com

unread,
Sep 17, 2013, 8:28:09 AM9/17/13
to
Hello MRT,

Thank you for you instructions. Unfortunatley I'm not getting the picture, but a zero instead (so as if the cell was empty). Any advise?

Thanks!

HB



On Tuesday, December 15, 2009 6:33:50 PM UTC+1, MRT wrote:
> Hi Richard,1. on the Sheet2, 2. Select the cell A1 , insert picture-1. http://office.microsoft.com/en-us/excel/HA100794091033.aspx#4 3. Adjust the cell A1 size to fit the picture-1. 4. Adjust the cell B1 to D1 size same as the cell A1. 5. Insert the picture-2 & 3 into the cell B1 & C1 in the same way. 6. If needed, adjust the picture-2 & 3 size to fit the cell B1 & C1. 7. Select again the cell A1, define the name as "pic_01". <http://office.microsoft.com/en-us/excel/HA101471201033.aspx?pid=CH100648431033#Create a name by using the Create Name dialog box> 8. Select again the cell B1, define the name as "pic_02" in the same way. 9. Select again the cell C1, define the name as "pic_03" in the same way. 10. Select the cell D1, define the name as "pic_04". 11. Select again the cell A1, and copy.12. move to the Sheet1, 13. Select the cell that you want to display the picture, paste picture as link. http://office.microsoft.com/en-us/excel/HP102541221033.aspx?pid=CH100675631033#2 14. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter. 15. Define the name as "pic_00" In the Apply names box, <http://office.microsoft.com/en-us/excel/HA101471201033.aspx?pid=CH100648431033#Create a name by using the Create Name dialog box>16. and in the "Refers to" box, type or paste following formula =IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04))) 17. Now, try to input 1, 2, 3 or others in the cell A1 in Sheet1.HTH -- MRT<Richard Roberts> wrote in message news:2009121562332...@tiscali.co.uk... > How can this be done in Excel 2007?>>> > MRT wrote:> > One way (event macro - free) ... # based on Excel 2003> > 1. on the Sheet2, > 2. Select the cell A1 , Press Alt > i > p > f, and select the picture-1. > 3. Adjust the cell A1 size to fit the picture-1. > 4. Still selecting the cell A1 condition, press Alt > o > c > w > Enter, select B1:D1, Alt > e > r. > 5. Select the cell B1 , Press Alt > i > p > f, and select the picture-2. > 6. If needed, adjust the picture-2 size to fit the cell B1. > 7. Select the cell C1 , Press Alt > i > p > f, and select the picture-3. > 8. If needed, adjust the picture-3 size to fit the cell C1. > 9. Select again the cell A1, press Alt > i > n > d, type the name "pic_01", and then click Add > OK. > 10. Select again the cell B1, press Alt > i > n > d, type the name "pic_02", and then click Add > OK. > 11. Select again the cell C1, press Alt > i > n > d, type the name "pic_03", and then click Add > OK. > 12. Select the cell D1, press Alt > i > n > d, type the name "pic_04", and then click Add > OK. > 13. Select again the cell A1, press Alt > e > c. > 14. move to the Sheet1, > 15. Select the cell what you want to display the picture, *hold down Shift key* and press Alt > e > n. > 16. Change the formula "=Sheet2!$A$1" displayed on the formula bar to "=pic_00" and Enter. > 17. Press Alt > i > n > d, type the name "pic_00" In the Apply names box, > 18. In the "Refers to" box, type or paste following formula > =IF(Sheet1!$A$1=1,pic_01,IF(Sheet1!$A$1=2,pic_02,IF(Sheet1!$A$1=3,pic_03,pic_04))) > and then click Add > OK. > 19. Now, try to input 1, 2, 3 or others in the cell A1.> > HTH> --> MRT> > Previous Posts In This Thread:> > On Monday, June 02, 2008 1:58 AM> nivek0 wrote:> > can i insert a picture with a if statement > I have 2 pictures but only want to display one dependant on what infomation > is in cell a1 is this possible using a IF statement??> > On Monday, June 02, 2008 5:36 PM> Gord Dibben wrote:> > Not with a formula.> Not with a formula.> > See John McGimpsey's site for a method using a Data Validation dropdown to > select an item which inserts a picture.> > http://www.mcgimpsey.com/excel/lookuppics.html>> > Gord Dibben MS Excel MVP> > On Sun, 1 Jun 2008 22:58:00 -0700, nivek05 <niv...@discussions.microsoft.com> > wrote:>> On Friday, November 20, 2009 5:51 AM > mahir ibrahim wrote:>> Insert pictures> Hi, > > I have 3 pictures but only want to display one dependant on what infomation > is in cell a1 is this possible using a IF statement??

0 new messages