Show Image Based On Cell Value
Jul 2, 2007
Question: I would like to have two pictures (one in cell B2, the other in cells D1-C10 to I10) display based on a data validation list that I have in A1. So, for example, if you click U.S.A., two pictures for U.S.A. show up; if you scroll down to Canada, two pictures show up. If you're interested, I have included the history of what I have tried in the past.
History of what I have tried:
I used this code before [url] , but that makes all pictures but 1 invisible and I need two.
So then I used this one,
Sub HelloWorld()
'Message box to say hello
MsgBox " Sub GetPicture()
Dim oPic As Picture, imgFlag As Range, imgMap As Range
' Loop Flag and Map images
'imgFlag = Worksheets("Image").Range("B1")
'imgMap = Worksheets("Image").Range("D1")
For Each oPic In Worksheets("Summary").Pictures
If (oPic.Name = Worksheets("Image").Range("B1").Text) Then
oPic.Visible = True
oPic.Top = Worksheets("Image").Range("B1").Top
oPic.Left = Worksheets("Image").Range("B1").Left
ElseIf (oPic.Name = Worksheets("Image").Range("D1").Text) Then
oPic.Visible = True
oPic.Top = Worksheets("Image").Range("D1").Top
oPic.Left = Worksheets("Image").Range("D1").Left
Else
oPic.Visible = False
End If
Next oPic
End Sub"
View 8 Replies
ADVERTISEMENT
Mar 31, 2009
I have a spreadsheet with two bitmap images inserted into it. In cell E2, I will enter a number, either a 1 or a 2. if I enter a 1, I want only the first image to be visible. If I enter a 2, I only want the second image to be visible. Is there a way to accomplish this (hopefully without the need for macros)? I've attached a spreadsheet as an example of what I'm trying to do. Also, note that I'd like the images to be stacked on top of each other so that they show up in the same place regardless of wether there's a 1 or a 2 in cell E5
View 13 Replies
View Related
Sep 4, 2007
Is there a way to have image box display an image with a name matching data from a cell? example: if I type "hello" in cell a1, Image box will load image named "hello". And display new images by changing the name in cell a1. Note: the images will be located in a permanent folder.
View 3 Replies
View Related
Jan 12, 2010
I have two bitmap images, and I would like to show only one image at a time, based on the content of another cell's pull-down list. If the user selects "AIR", then display the AIR image. If the user selects "SERVO", then display the SERVO image.
View 2 Replies
View Related
Feb 3, 2014
Running a macro that would insert product images in to a sheet based on a SKU that is in a different column. My sheet has an image in Cell A3 based on the SKU code that is inputted in to D3. All of my images are stored in F:Images I will have about 500 SKU's that all need images and will be named the same as the SKU I enter in to Column D.
Can this be done via a VBA script?
View 2 Replies
View Related
Oct 10, 2007
Step1: Type the picture name that is store somewhere in the computer (C:/MyDocument/Pics)
Step2: After typing the pic name into the cell, the pic that is the same name as the cell text will be display (Type "apple" and the other cell load out the apple pic that is stored)
View 9 Replies
View Related
Aug 21, 2006
How do I load an image based on the cellref value already in the sheet? I have pictures in a worksheet labelled picture 1,picture 2. If Cell A1 = 1 I want it have picture 1 loaded in that cell. if cell a2 = 2 load picture 2 in that cell. also if changes to =2 replace picture1 in a1 with picture2.
View 2 Replies
View Related
Feb 25, 2014
I have found Displaying an image based on text contained within a cell. which appears to be a very similar question, but no steps to follow.
Basically I have a folder with around 300 images in it, each is called ProductId number.jpg
eg Z99S1234567.jpg
In my sheet I am using the same ProductId number and would like to display the product image on the sheet. I have A1:D19 as spare space Lookig at the info I have found the image will have to go into a cell, so can I break all the rules and merge cells to fit the image in, or do I need to make a single cell big enough or can I use VBA to import the image somehow to a specific place on the sheet.
There will only ever be one looked up image on the screen at a time.
View 1 Replies
View Related
Aug 17, 2007
I'm trying to display a different image based on the contents of a cell. For example if cell A1 = "Gerrard" I would then like to display a picture of Steven Gerarrd. Is this possible? If so can anyone give me a steer in how I might acheive this.
View 3 Replies
View Related
Mar 18, 2014
I need to link an image to a cell value and display the selected image in a new sheet of the same excel. I am attaching samplefile for easy reference. The requirement is, from the workout sheet when I select from drop down list, then the corresponding cell value appears in Parameter sheet in C9 cell.
There are four images copied in Parameter excel. The given image has to be selected and linked to the C9 cell value. Based on the selection that particular image should be shown on Sample Picture sheet. Here based on the selection only the image should reflect here.
View 12 Replies
View Related
Jul 9, 2014
Posted this on another forum. [URL] .....
View 1 Replies
View Related
Feb 20, 2013
I'm looking for vba code to use that will incrementally rotate an image based on values entered within a cell of an Excel spreadsheet.
I have two graphics, one is the face of a dial and the other is the pointer very much like a speedometer. I can achieve the desired outcome using two excel charts, one overlaid on top of the other, but, this doesn't give me the visual effect I'm looking for.
I'm using the face of the semicircle dial as the background image and I have a separate image for the pointer. When a value between 1 and 100 is entered in cell O3 i would like the pointer to rotate to that position on the dial. The pointer is to have a fixed position and arc left to right where the value of 1 is left-most and horizontally aligned, and for the value 100 the pointer would point in the opposite direction.
View 14 Replies
View Related
Nov 12, 2012
Is it possible to put image in comment base on the value in cell ?
For example
c1 c2 c3
R1 A
R2 B
R3 C
I can put A.jpg to C1R1"A", B.jpg to C2R2 "B", and C.jpg to C3R3
Or irregular arrangement ??
View 9 Replies
View Related
Jul 9, 2014
I'm looking for a way to rename an object (which is an image) based cell values. Not to sure where to start.
View 4 Replies
View Related
Jan 22, 2014
I am looking for a way to take the picture name associated with an image ie: (picture 571) and place that picture name in the cell next to the image.
I can see the picture name - it registers in the top left box that usually indicates the cell the cursor is on... and I could manually type that name next to each image.
However my spreadsheet has several thousand rows- each with several columns of information and an image..
I am looking for a way "formula?" to automatically read the image in cell J4 and populate cell K4 with the image name... and so on.
The reason for my request... is I am importing products into a web based shopping cart... to do so I have to export the products to a csv and import that csv into the shopping cart. The process of exporting to a csv- strips away all the images and leaves just data.
I found that I can save the document as an html and that process creates a folder with all the images- saved as (picture 571.jpg) if the resulting csv had the image name... the shopping cart would then look for that image name in my image file and it would populate into the shopping cart appropriately.
This seemed on it's face like a really simple thing to do, I have plenty experience with excel & I thought I'd be able to make cell k4= j4 and tada it would glean the image name & I could simply copy that formula all the way down the sheet & it would be done... but I just cant find the magic button that freely gives up the image name...
View 5 Replies
View Related
Mar 28, 2014
I have this excel that look like this:
A1, B1, C1 contains an image with the numer 1, 2 and 3.
D1 is a cell where you can put only the number 1 2 and 3 (alert if you insert something else)
E1 have to contain the number in the D1 written with letters (I did this with the formula: =IF(D1=1;"One";IF(D1=2;"Two";IF(D1=3;"Three";"Wrong Imput")))
F1 have to contain the image from the A1, B1, C1 corresponding to the number in D1
Now, how do I do this ? I read an article here, on this forum, about doing this. I know how to copy an image from A1, B1, C1 in F1, but I don't know how to make a formula to do this.
To copy an image from A1, B1, C1 I do this:
- I copy the cell (F1)
- I hold Shift key
- I go to Start -> Paste -> Click the little arrow -> Last option (Translated from my language I think It's Linked Image) -> I switch the formula in that cell to =A1 or =B1 or =C1 -> The image appears.
I really want to know how to do that thing. I saw that you can not use an IF formula in the linked image cell so I need another option.
By the way, I attached the excel. If you will open it, go to Item2 Spreadsheet. I'm using Excel 2010 now.
View 2 Replies
View Related
Sep 14, 2007
I have a form where users will fill out data over the course of the month. When all required data is submitted, I have an image of a check mark show up to indicate that the month's information is complete.
How can I schedule the images to reset to
image.visible = False
when the workbook is opened for the first time the following month? Auto Merged Post;I've done some code that will get this done and put it in a workbook_open module. It will look at the destination fields for data for the current month and if they are empty, make the referenced image invisible.
But I am running into an error. It is saying "Object Required" and when I hover it says "false = false"
Here is the sample of the
Private Sub Workbook_Open()
With Sheets("Checklist")
For Each c In . Range("A6", .Range("A69"))
If Month(c) = Month(Now()) And Year(c) = Year(Now()) And c.Offset(0, 3) = "" Then
Image1.Visible = False
End If
Next c
End With
End Sub
View 3 Replies
View Related
Aug 7, 2007
Suppose i have a directory on my HD with 100 images. Now i want to show them all in one column (each in 1 cell),
View 3 Replies
View Related
Aug 8, 2006
I have a dataset that includes the path and optionally an HTTPS URL to an image. Is it possible to embed this image in a cell?
Short of that what might be some other options?
View 11 Replies
View Related
Mar 22, 2014
Programming Excel VBA Macro to do OCR (text recognition) from a prt scr screen capture image and input the text into cells. Currently my Excel file has a push-button, and upon clicking on it the macro pastes into Excel the current clipboard image I have created by pressing prt scr while in another program. The macro then crops the image to the region with the applicable text. I have to then manually type the text I see in image format into the appropriate cells.
the VBA coding to automate this? I'd like it to use the clipboard image and run it through OneNote OCR, after which the applicable text values are automatically entered into the cells. Ideally the code will first crop to the region with the desired text before it does OCR. If this is not feasible, it will need to incorporate a method (keyword search?) to hone in on the desired text after the entire prt scr image has been OCRed.
View 8 Replies
View Related
Dec 12, 2008
I have 15 sheets - Resident 1, Resident 2 etc
If cell A1 on Summary tab contains 10, I want sheets Resident 1 to Resident 10 visible, everything over Resident 10 to be invisible
If cell A1 on Summary tab contains 5, I want sheets Resident 1 to Resident 5 visible, everything over Resident 5 to be invisible
View 9 Replies
View Related
Dec 31, 2006
I have folder with 5 photos on c (c:Pictures). Photos are named a, b, c, d, and e. In Excel workbook sheet1 (c:Photos.xls), how to display the photos in cell range (B1:F10) in response to change in cell A1 (i.e., when A1 cell value is “a”, the photo “a” is displayed in the range B1:F10, and so on when the A1 value changes)
View 3 Replies
View Related
Mar 2, 2007
Call centre data for financial years located in separate workbooks (1 for each year)
Here's what I want to create.
One main file to consolidate/view all data
I've tried to make this as user friendly as possible by having a validated list, whereby the user can select the year they want to view, and hey presto, the data changes to reflect the year displayed in the validated cell.
View 5 Replies
View Related
Apr 25, 2014
macro which can show a picture of a certain cell and if I change the value of that cell the picture will be changed to the new cell value,
Like
If I put in cell A1 value DOG, so the pic in cell B1 is a dog pic that I defined before, and if I change that value to a cat, the pic should be changed to another pic.
View 1 Replies
View Related
Sep 15, 2007
I have a rather large report full of data, 10+ columns contain a RANKING column, and these ranks, 1-10, are assigned by a % bracket:
1-20% = 1
21-40% = 2
41-60% = 3
61-80% = 4
81-100% = 5
101-120% = 6
121-140% = 7
141-160% = 8
161-180% = 9
181-200% = 10
There are several hundred rows in each column that all need individual ranks. My first thought is to program a if then else statement for 1 to 10 with a % limit range, but this isnt feasable as i would have to program a separate if statement for each of the many hundred rows, or do one heck of a fancy loop that i just cant contemplate (as the rows are split and sepperated... no solid uniform place for the data to be plugged.) What is the best way to go about this? I'm at a total loss of ideas with my knowledge of excel.
View 2 Replies
View Related
Jun 10, 2008
I have two sheets say:
Sheet1
Sheet2
Sheet1 has a few comboboxes saying (YES / NO) conditions Which are assigned to particular cells (for Ex: say Combobox1 value assignes to Sheet1!B5 )
If Sheet!B5 = YES some rows in Sheet2 Say ( Row12 ,Row 15,Row 16) has to be hide.
I will add a command button to sheet1 and call macro if i click command button checking the conditions in sheet1 combo boxes..rows in sheets2 has to hide..
View 4 Replies
View Related
May 7, 2013
Trying to have A1 in Sheet1 having three values 1,2,3 if A1 = 1 hide rows from 1:5 and 10:1500 in three Sheets2,3,4
View 8 Replies
View Related
Jan 10, 2005
I have a spreadsheet that queries the web for a weather forecast each day. I'd like to associate pictures on the excel page based on the weather description, but can't figure out a way to select /change the picture automatically.
View 3 Replies
View Related
Aug 3, 2012
I have a spreadsheet where when cell is clicked, it opens the hyperlink dialogue and allows a user to insert a hyperlink into the cell next to it.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 27 And Target.Row > 7 And Target.Row < 401 Then
If Application.Dialogs(xlDialogInsertHyperlink).Show Then
Target.Cut Target.Offset(, 1)
End If
End If
End Sub
So if the cell AA8 is click it allows the user to insert a hyperlink and the hyperlink is pasted in to the cell AB8.
What I need: Is for the cell AA8 to say "Click to Add Hyperlink" and then once a hyperlink is added AB8 to say in the cell "Hyperlink to Folder".
View 1 Replies
View Related
Jun 5, 2013
I'm quite new to VBA, but I am attempting to get a Forms ComboBox to appear or disappear based on whether a certain cell (P7) reads YES or NO. P7 in turn updates in turn based on a user-selected value. As of now, the ComboBox only appears or disppears if I go back in and out of the formula I entered into P7. Basically, I want my ComboBox to dynamically update based on the value in P7. That may sound a little muddled, so here is my code for the ComboBox:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("P7")) Is Nothing Then
If UCase(Target) = "YES" Then
Me.Shapes.Range("Drop Down 30").Visible = msoTrue
Else
Me.Shapes.Range("Drop Down 30").Visible = msoFalse
End If
End If
End Sub
View 3 Replies
View Related