ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup Bmp (https://www.excelbanter.com/excel-worksheet-functions/20530-vlookup-bmp.html)

briank

Vlookup Bmp
 
I am trying to integrate a vlookup command with a bmp. I have a bmp located
on my c: drive and I want to show this in cell B1. Ideally I want to copy
this formula down several cells as well. Am I close to getting the formula
below to work?

=IF(VLOOKUP(C4, PicTable, 2, FALSE)="State",activesheet.picture.insert
("C:\Documents and Settings\a-brjohn\State.bmp"),"")

Jason Morin

You can't do it with a formula. Either use VBA - J.E.
McGimpsey has a nice example using a validation list:

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

Or see Andy Pope's site. He has an example using an XY
scatter chart (no VBA required):

http://www.andypope.info/fun/picviewer.htm

HTH
Jason
Atlanta, GA

-----Original Message-----
I am trying to integrate a vlookup command with a bmp.

I have a bmp located
on my c: drive and I want to show this in cell B1.

Ideally I want to copy
this formula down several cells as well. Am I close to

getting the formula
below to work?

=IF(VLOOKUP(C4, PicTable, 2, FALSE)

="State",activesheet.picture.insert
("C:\Documents and Settings\a-brjohn\State.bmp"),"")
.


Dave Peterson

You're mixing excel formulas with VBA and that won't work.

But J.E. McGimpsey has a routine you may like:
http://www.mcgimpsey.com/excel/lookuppics.html
He has a neat way of doing things like this.

briank wrote:

I am trying to integrate a vlookup command with a bmp. I have a bmp located
on my c: drive and I want to show this in cell B1. Ideally I want to copy
this formula down several cells as well. Am I close to getting the formula
below to work?

=IF(VLOOKUP(C4, PicTable, 2, FALSE)="State",activesheet.picture.insert
("C:\Documents and Settings\a-brjohn\State.bmp"),"")


--

Dave Peterson

briank

Thank you for the link. Although this web site allow the user to change the
photo based upon a drop down menu I am having trouble figuring out how to
modify the pictures to my own photos as well as figuring out how to copy the
formula down several rows. Any help would be appreciated.

"Dave Peterson" wrote:

You're mixing excel formulas with VBA and that won't work.

But J.E. McGimpsey has a routine you may like:
http://www.mcgimpsey.com/excel/lookuppics.html
He has a neat way of doing things like this.

briank wrote:

I am trying to integrate a vlookup command with a bmp. I have a bmp located
on my c: drive and I want to show this in cell B1. Ideally I want to copy
this formula down several cells as well. Am I close to getting the formula
below to work?

=IF(VLOOKUP(C4, PicTable, 2, FALSE)="State",activesheet.picture.insert
("C:\Documents and Settings\a-brjohn\State.bmp"),"")


--

Dave Peterson


Dave Peterson

You have to add all your pictures to the worksheet. J.E. shows that in his
instructions.

Then the code hides/shows the pictures.

It works nicely if there's only one picture that should be visible.

You may want to post back with your real requirements if this isn't what you had
in mind.

briank wrote:

Thank you for the link. Although this web site allow the user to change the
photo based upon a drop down menu I am having trouble figuring out how to
modify the pictures to my own photos as well as figuring out how to copy the
formula down several rows. Any help would be appreciated.

"Dave Peterson" wrote:

You're mixing excel formulas with VBA and that won't work.

But J.E. McGimpsey has a routine you may like:
http://www.mcgimpsey.com/excel/lookuppics.html
He has a neat way of doing things like this.

briank wrote:

I am trying to integrate a vlookup command with a bmp. I have a bmp located
on my c: drive and I want to show this in cell B1. Ideally I want to copy
this formula down several cells as well. Am I close to getting the formula
below to work?

=IF(VLOOKUP(C4, PicTable, 2, FALSE)="State",activesheet.picture.insert
("C:\Documents and Settings\a-brjohn\State.bmp"),"")


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com