Show Image Based On Cell Value
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 Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Hide Or Show An Image Based On A Cell Value
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 Replies!
View Related
Display Image Based On Image Name In Cell
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 Replies!
View Related
HOW To Load Image Based On Cell Value
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 Replies!
View Related
Load Image Based On Cell Value
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 Replies!
View Related
Display Image Based On Cell Content
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 Replies!
View Related
Hide/Show Image By Month
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 Replies!
View Related
Show Sheets Based On Cell Value
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 Replies!
View Related
Show Different Data Based On Value Of Cell
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 Replies!
View Related
Show Picture Based On Cell
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 Replies!
View Related
Show Numbers Based On Percentage In Cell
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 Replies!
View Related
Automatically Hide / Show Rows Based On Cell Value
I wrote a small code to hide some columns if a certain cell is equal to a certain string. The cell is actually a drop down list and when they select a certain one, I want it to hide 2 columns. So I wrote the code with sub name Action, but I want it to be running all the time. I tried to achieve this by writing the following code however it gave me error 438 for my 2nd line. Sub Auto_Open() Range("A1").OnEntry = "Action" End Sub Auto Merged Post Until 24 Hrs Passes;Oh, by the way error 438 states: Object doesn't support this property or method
View Replies!
View Related
Hide & Show Rows Based On Cell Value
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 Replies!
View Related
Formula To Show The Value Of One Cell Based On The Value Of Another To Automate Some Internal Processes
I'm trying to get a formula to show me the value of one cell based on the value of another to automate some internal processes. Cell J3 returns today's date, then J4 says what week number that is. J5 concatenates the two to make the look up. Column A is named range "PN", and columns C onwards are named ranges to match the column heading. What I'm wanting is for the result in test cell 2 (J8), is to return the stock requirements for the current week, based on the result of cell J5. I can do this by using nested IF statements, but that would be 8 cells to calculate, then another one to find the cell that has a value. If there a way to get Excel to recognize the value in J5 as a range name, so it just needs the one formula?
View Replies!
View Related
Formula To Show A Date Range Based On The Amount Shown In Another Cell
Attached is a excel file that has a working formula for tracking cashier variances. I edited out names etc. I added a new cell called Track Back on the employee search sheet. What I want to do is only show variances for the amount of days back selected in the Track Back cell. For example if I select the last 30 days, only the last 30 days would show up below in the sheet. I am not sure if this is even possible based on the forumla that is already on the sheet. I couldn't figure out a way of doing it. But there are a lot of people on here much better with excel than me
View Replies!
View Related
VLOOKUP To Return Image Based On If Statement
OK i have put the membership cards on the same sheet as my raw data so to make the formulas easier. On the membership card i have under membership level i have the formula : =VLOOKUP($J$3,A:E,4,FALSE) there is 3 types of level bronze, silver and gold what i would like is if the level is gold after then an image to be placed in the cell rather than the word gold and a different image for silver and a different image for bronze.
View Replies!
View Related
Hide/Show Sheets Based On Cell Values & Validate Entry
excal VBA programming.I have attached the file name "help" for your easy explanation purpose. 1. Is it possible to hide sheet nos. 1,2,3,4 & unhide the sheet as wished by me by puting the value (1or 2 or 3 or 4) in B3 cell. 2.There are per day production rate in E18 to E22 cell. Now whenever I will give value in H18 or H19 or H20 or H21 or H22, it will check whether the value is same with the respective E 18 or E19 or E20 or E21 or E22 cell. If both the values are not equal then give a message box "WARNING!!! YOUR VALUE IS NOT SAME". Can it be possible by creating VBA programming.
View Replies!
View Related
Add Image To Worksheet Image Control
I am trying to display an image ("image") on an image control ("Image1") placed in a worksheet ("Sheet1"). The problem is that I want this action to take place when I press a button in a user form. I am trying to use the following code, but it seems that VBA does not recognize the image control ("Image1") in the worksheet. Private Sub cmdDisplayImage_Click() Dim image As Variant image = ThisWorkbook.Path & "sun.jpg" Sheets("Sheet1").Activate Image1.Picture = LoadPicture(image) End Sub
View Replies!
View Related
Link Image To Cell
In Excel, I have a sheet for each team that I manage. Each sheet lists the team members and displays their picture below their names. Some people are on multiple teams/sheets. I have a master list with everybody's name and picture that I copy and paste the pictures from when putting a team together. This has become a very tedious process. Is there a way I can type the person's name on a team sheet and have their picture automatically appear below their name? I don't know if this can be done with some kind of lookup or if it will involve VB. I tried making the picture the background of an Autoshape or comment, but I could not figure out how to dynamically change the picture based on the name in a cell.
View Replies!
View Related
Embed Image In Cell
why there is no option for adding a picture manually to the comment of a cell? when editing a comment the Insert picture from file from the Insert menu is disabled ! (Office XP) and can you please edit the code so the Width and Height of the comment box is set exactly to the dimensions of the picture? (that is how to get the exact width and height of the picture being inserted from code in excel ?)
View Replies!
View Related
Fit Image To Cell
I'm looking to see if there is a feature similar to using F2 to paste text into a cell and having the cell automatically expand to the needed row height. I just need it for images. Is there a feature that will allow me to paste a picture/image into a cell and have the cell automatically expand to the height &/or width needed to accommodate the size of the image?
View Replies!
View Related
Display Image In Cell
I am trying to add a feature to an excel spreadsheet that will display image files (map files, .emf if possible), whenever its respective cell is clicked. I have a reasonable amount of experience with macros, although it was purely in excel which completely limits my vba skills. I could probably figure something out if I spent a few weeks on it and then it would probably be like 90 mb and slow.
View Replies!
View Related
Displaying A Particular Image Depending On The Value Of A Cell
I have 3 'speedometer' type images one for green, one for amber and one for red. I need to display ONE of these on a number of occasions depending on the value of a cell. E.g. If the value is 8.0 or above then I want to display the green one If the value is 4.0 or above but below 8.0 I want to display the amber one If the value is less than 4.0 I want to display the red one
View Replies!
View Related
If Cell Equals Then Image File
I am looking for a formula to allow an image file to show when a cell equals a certain text string. If it can be done can it be achieved with multiple images? I am making a database that will calculate from many variables my required glass sizes, given the size and window type and I was hoping to go one step further by making it raise a purchase order from a series of images and other related data.
View Replies!
View Related
Insert Image Into Cell From Internet
I want a function that takes a URL string and then inserts a picture into the cell and fits it into the size of the cell (which I made square). The images are small but over 50 000 so it would be impractical to download them all; thus I want the spreadsheet to insert a specific one, based on my formula. Tried a macro I found but it only gave the the '1004 Picture class' error. So the function must be simple to use, maybe: ....
View Replies!
View Related
Customize Background Of A Cell With An Image
I have excel 2003 I would like to identify text cells of my document containing names of speakers in a conference with their nationality. I would like to do that by setting the background of the cell with the national flag of the country where the speaker comes from. I tried to select the flag as an image and put it over the name with trasparency but then it result very not convenient to modify the text in the cell and the image makes the worksheet very heavy
View Replies!
View Related
Image Dependant On Cell Content
i have a column with numbers in, in numerical order, however some cells are null. ie. 1 2 3 4 .. etc. I need to put paste images from a folder next to these numbers. (1.bmp next to '1' etc) and i need to leave the empty cells in. This code is sort of right.. Sub aids() Dim strPath As String Dim strFile As String Dim lngRow As Long Dim objPic As Object Dim sngMaxWidth As Single On Error Resume Next lngRow = 2 strPath = "C:images" strFile = Dir(strPath & "*.bmp") With ActiveSheet Do While strFile <> ""..........
View Replies!
View Related
Add Image To Cell Comment Box
I have a set of data with text in one cell and images in a cell adjacent the text to illustrate the text. I am trying to figure out how to add a comment to the cell containing the text and take the image in the adjacent cell and put it in the comment. Is there a way to do this, or do I have to write a macro that saves the images as their own files and then insert the image files into the comment?
View Replies!
View Related
Insert Image Using Cell For Part File Name
Split from Open Image Using A String & Cell For File Name. what it looks like, but maybe I am not using the FollowHyperlink correctly? Sub testFloodMap() Application. ScreenUpdating = False Sheets("FloodMap").Select 'Picture = ActiveSheet. Range("W4").Value This works manually with the path in "W4" 'Now I tried to use the FollowHyperlink next Application.FollowHyperlink "C:Documents and Settingsjim hutchMy DocumentsNarrative1My Appraisals2009-" & Sheets("Base").Range("B2") & "floodmap.jpg" Sheets("FloodMap").Select ActiveSheet.Pictures.Insert(Picture).Select Exists = Dir(Picture, vbNormal).....................
View Replies!
View Related
Image Is Hyperlinked To A Cell With Specific Text Entered
Is there any way I can make it so an image is hyperlinked to a cell with specific text entered. After clicking on the image, the cell where the image is hyperlinked to changes text. For example: An image of a strawberry is hyperlinked to a cell which contains the word "strawberry". After clicking on the strawberry image, the cell which contained the word "strawberry" now contains the word "strawberry1". If you understand that, I would so love the help. I also posted this is question here http://www.excelforum.com/showthread.php?t=637811
View Replies!
View Related
MouseOver Cell That Makes Apear And Disappear An Image
I would like to do a routine in VBA on excel 2007 that makes the following: 1- When the mouse is over a cell it pops-up a window that shows a picture; 2- When the pointer is removed from the cell the window that contains the picture closes; It is very important that the picture that is shown be adressed by a relative path from the folder in which is the excel file. The pictures can change; this is the reason that the picture should be addressed by a path.
View Replies!
View Related
Image Manipulation In Photoshop To Lose The Cell Data
I've created a humongous spreadsheet in Excel- 26 million cells and a file size of about 500mb. The result of these calculations is a pattern derived by conditional formatting. I'd like to get the pattern into Photoshop- It would actually simplify image manipulation in Photoshop to lose the cell data, and the underlying formulas are of no use. The file seems to be too big to save into a PDF file. Is there another way to get the Image into Photoshop?. The other alternative is to reduce the file size by stripping out unnecessary cell data and formulas without losing the pattern.
View Replies!
View Related
If A Cell Has Data Show It If Not Show 0
I have a column of data held in column B. I am required to show the following. If there is data in the cell then it is to be left. If there is no data in the cell then I would like to show the value 0. I have tried using a circular reference, using the formula =IF(ISBLANK(B1),0,B1) and other similar formulas but they dont work as the formula overwrites the data in it. do I need a macro?, or conditional formatting?
View Replies!
View Related
Show Worksheets Based On User
I have a workbook with multiple worksheets, and I am trying to create a title sheet where a user can select their name from a drop down list, and Excel will show only the tabs that are associated with that user. For example: The worksheets in the workbook are: Heading Control sheet Client Relations Admin Sales Summary etc... The user Hudnall needs to see the sheets: Client Relations Sales Summary The user Ferguson needs to see the sheets: Sales Summary Control Sheet I want the user to be able to select their name from a drop down list on seperate sheet, and have the Macro show only the sheets that they need to see.
View Replies!
View Related
Show Sheet Based On Weekday Name
I have 5 sheets in a workbook named the following: Monday delivery Tuesday delivery Wednesday delivery Thursday delivery Friday delivery I want a macro to fire when the workbook opens. I want it to look at what day it is and then show the sheet for the next day and hide all the rest. Example, with today being Tueday, if someone opened the workbook, I want only the Wednesday delivery sheet to be visible and all the others to be hidden, well very hidden. Then tomorrow it will show Thursday delivery and so on. If opened on a Friday, it should show the Monday delivery sheet.
View Replies!
View Related
Show Users Only Certain Data Based On Their Name
I have a large workbook that contains markbook info of all my classes that I teach. I don't want them to see all my workbook as it would be too confusing. I would like to hide all the data and have a simple INPUT box on a separate page that would ask for their name. The name would then be used to find the row number, add this to a specific column number (always the same) which hold their marks and then return the mark in a Message box.
View Replies!
View Related
Show Value From A Table On Second Sheet Based On Month
I need to display a value that is in a table on one sheet when the month is matched on the first sheet. The month that I need to match up is on sheet1 in cell B1 I have a table on sheet2 that is a year budget, the cell range for the months are C5:Y5 Under each month I have a list of headings and it is these cells that I need to display on sheet1 in the relevant box.
View Replies!
View Related
Show Room Occupancy Based On Dates
I want to a create a formula that reviews a series of start dates and end date, then sums the number of days (if the end and start date are withing a yearly period). i.e. Column A = Room No Column B = Start dates Column C = End dates Column A references a list of rooms (Room List) If Column A = Room123 If start date is equal to or greater than 31/12/2007 If end date is less than or equal to 31/12/2008 Calculate the number of days used.
View Replies!
View Related
Hide & Show Sheets Based On Names
I made one file with 13 sheets. sheet1 tab name is : MAIN and other sheet tab name like following 2. xyz-Sales 3. xyz-Rev 4. xyz-SSN 5. xyz-ddn 6. abc-Sales 7. abc-Rev 8. abc-ddn 9. abc-ssn 10. ddd-sales 11. ddd-Rev 12. ddd-ssn 13. ddd-ddn In Main sheet There are 3 buttons 1 . XYZ 2. abc 3. ddd when user press on xyz button then only xyz sheets (like sheet 2 to 5) are shows to user and other sheets are very hide if user press abc button then only abc sheets (like sheet 6 to 9) are shows to user and other sheets are very hide i don't want to use Sheet2.Visible = xlSheetVeryHidden i want to use finde xyz sheet tab name and shows and other are hide.
View Replies!
View Related
Show Data From Another Worksheet Based On Matching Properties
I'm building a spreadsheet for a sporting franchise using a pull-down validation menu. Once the opposing team name is selected from the drop down menu, I would like it to display the opposing teams players and their statistics. On the database worksheet, I have a web query pulling names and statistics from the web. Each player name has his team name in his corresponding row. What function can I use that will search for that team name and report it back to the display sheet? Once I have the player name there, I think I can figure the statistic portion... But I can't seem to figure out how to pull all of the players with the matching team name into my display sheet. Example: A1 on worksheet "A" contains a pull down menu with team names "Lightning", "Storm", "Magic", and "Thunder". A16-A20 on worksheet "B" contains players from team "Lightning" A21-A25 on worksheet "B" contains players from team "Storm" A26-A30 on worksheet "B" contains players from team "Magic" A31-A35 on worksheet "B" contains players from team "Thunder" B16-B20 on worksheet "B" contains team name "Lightning" B21-B25 on worksheet "B" contains team name "Storm" B26-B30 on worksheet "B" contains team name "Magic" B31-B35 on worksheet "B" contains team name "Thunder" If I pull down "Lightning" on A1 (worksheet "A"), I want the following to display:..........................
View Replies!
View Related
Show/Hide Command Button Based On Location
What i am trying to do is make a command button appear when you hit any cell of the row its on. For example, If you were to hit any cell on rows 1 or 2 the command button will appear and when I am not on the visible property goes back to false. I have a ton of buttons on this sheet and I am trying to clean it up so buttons only appear as needed.
View Replies!
View Related
Show Late & On Time Based On Dates
I'm working with data as displayed below. My objective is to create a table by Model with summed quantitiies in two columns representing On-Time and Late. On-Time is achieved when Date Shipped is on or before the Promised Date. I have included the required format to be achieved in the second example. I'm willing to work with macros or VBA for the solution. I just need guidance to learn how to accomplish this task. CREATE TABLES LIKE BELOW? ----B---- -----C------ --D-- ----E----- 6 Promised Date Shipped Inspection 7 Date Mod # 8 11/30/07 11/01/07 780 15216 9 10/10/07 11/01/07 230 15174 10 11/20/07 11/07/07 665 16314 11 9/13/07 11/07/07 230 15008 12 12/10/07 11/08/07 780 14452 13 11/15/07 11/08/07 780 15233 14 12/18/07 11/12/07 665 15219 15 12/3/07 11/12/07 780 15224 16 10/14/07 11/12/07 230 15011 CREATE TABLES LIKE BELOW? -N-- ---O--- -P-- 7 Mod On Time Late 8 225 9 230 10 335 11 555 12 665 13 780 14 1120
View Replies!
View Related
Show (Filter) Rows Based On Multiple Criteria
I'm trying to create a formula (used in sheet 2 column B) that would generate the results in sheet2.B based on the contents of sheet 1. sheet2.B2 would contain a formula searching for the both "Y" in sheet1.C and the text in sheet2.A2 (in this case "E&P"). When each match is found, the contents of sheet1.A should be returned to sheet2.B, as shown in the mockup. There will be multiple matches (at least 15-20) for each search criteria, and I don't know how many there will be ahead of time. I've tried various formulas, and they either have incorrect syntax and return every row in a range, or only return the first match correct match each time instead of all correct matches. I found some UDFs posted online that claim to do this, but I've gotten them into the spreadsheet and they generate # NUM errors. I would prefer to work with Excel-native formulas if possible, because I'm going to eventually hand this off to someone else to maintain and they may not have the level of expertise to deal with UDFs.
View Replies!
View Related
|