Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
Hi there,
Lets say in Sheet 2 I had pasted 3 pictures On sheet 1: A1=1 A2=2 Is it possible to put a formula in B1 that has this logic: If A1=1 then show picture 1, otherwise show picture 3 I doubt its possible, but you never know eh. or, if I have 3 images saved on my harddrive, can I use a formula to show the image in a spreadsheet without having to insert/paste it in? Many thanks, AJ |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
Try JE McGimpsey's page at:
http://www.mcgimpsey.com/excel/lookuppics.html -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "AJ" wrote: Hi there, Lets say in Sheet 2 I had pasted 3 pictures On sheet 1: A1=1 A2=2 Is it possible to put a formula in B1 that has this logic: If A1=1 then show picture 1, otherwise show picture 3 I doubt its possible, but you never know eh. or, if I have 3 images saved on my harddrive, can I use a formula to show the image in a spreadsheet without having to insert/paste it in? Many thanks, AJ |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
Hi,
Thanks for getting back to me. It's a good answer, but not quite what I'm looking for. I'll explain exactly what I'm doing: I'm studying Japanese and I'm wanting to create a spreadsheet which randomly selects a number of images from the alphabet and then I'll test to see if I can read them. Let's say I copy and paste 45 images of Japanese symbols on to Sheet 2. on sheet 1, cells A1:K1 contain a formula which shows random whole numbers between 1 and 45 (these values change each time I press F9/re-calculate the sheet) on sheet 1, cells B1:K1 contain a formula which results in an image depending on what value is shown in the cell above it. So, whenever I press F9/recalculate the sheet, new images are instantly placed in cells B1:K1 for me to try and read. Hope that makes sense. Thanks again, AJ "Max" wrote: Try JE McGimpsey's page at: http://www.mcgimpsey.com/excel/lookuppics.html -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "AJ" wrote: Hi there, Lets say in Sheet 2 I had pasted 3 pictures On sheet 1: A1=1 A2=2 Is it possible to put a formula in B1 that has this logic: If A1=1 then show picture 1, otherwise show picture 3 I doubt its possible, but you never know eh. or, if I have 3 images saved on my harddrive, can I use a formula to show the image in a spreadsheet without having to insert/paste it in? Many thanks, AJ |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
I meant B2:K2 (not B1:K1 as previously stated)
"AJ" wrote: Hi, Thanks for getting back to me. It's a good answer, but not quite what I'm looking for. I'll explain exactly what I'm doing: I'm studying Japanese and I'm wanting to create a spreadsheet which randomly selects a number of images from the alphabet and then I'll test to see if I can read them. Let's say I copy and paste 45 images of Japanese symbols on to Sheet 2. on sheet 1, cells A1:K1 contain a formula which shows random whole numbers between 1 and 45 (these values change each time I press F9/re-calculate the sheet) on sheet 1, cells B1:K1 contain a formula which results in an image depending on what value is shown in the cell above it. So, whenever I press F9/recalculate the sheet, new images are instantly placed in cells B1:K1 for me to try and read. Hope that makes sense. Thanks again, AJ "Max" wrote: Try JE McGimpsey's page at: http://www.mcgimpsey.com/excel/lookuppics.html -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "AJ" wrote: Hi there, Lets say in Sheet 2 I had pasted 3 pictures On sheet 1: A1=1 A2=2 Is it possible to put a formula in B1 that has this logic: If A1=1 then show picture 1, otherwise show picture 3 I doubt its possible, but you never know eh. or, if I have 3 images saved on my harddrive, can I use a formula to show the image in a spreadsheet without having to insert/paste it in? Many thanks, AJ |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
I meant B2:K2 (not B1:K1 as previously stated)
"AJ" wrote: Hi, Thanks for getting back to me. It's a good answer, but not quite what I'm looking for. I'll explain exactly what I'm doing: I'm studying Japanese and I'm wanting to create a spreadsheet which randomly selects a number of images from the alphabet and then I'll test to see if I can read them. Let's say I copy and paste 45 images of Japanese symbols on to Sheet 2. on sheet 1, cells A1:K1 contain a formula which shows random whole numbers between 1 and 45 (these values change each time I press F9/re-calculate the sheet) on sheet 1, cells B1:K1 contain a formula which results in an image depending on what value is shown in the cell above it. So, whenever I press F9/recalculate the sheet, new images are instantly placed in cells B1:K1 for me to try and read. Hope that makes sense. Thanks again, AJ "Max" wrote: Try JE McGimpsey's page at: http://www.mcgimpsey.com/excel/lookuppics.html -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "AJ" wrote: Hi there, Lets say in Sheet 2 I had pasted 3 pictures On sheet 1: A1=1 A2=2 Is it possible to put a formula in B1 that has this logic: If A1=1 then show picture 1, otherwise show picture 3 I doubt its possible, but you never know eh. or, if I have 3 images saved on my harddrive, can I use a formula to show the image in a spreadsheet without having to insert/paste it in? Many thanks, AJ |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
Thanks for getting back to me. ...
You're welcome. Regrets. I'm out of further suggestions for you here. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "AJ" wrote in message ... I meant B2:K2 (not B1:K1 as previously stated) "AJ" wrote: Hi, Thanks for getting back to me. It's a good answer, but not quite what I'm looking for. I'll explain exactly what I'm doing: I'm studying Japanese and I'm wanting to create a spreadsheet which randomly selects a number of images from the alphabet and then I'll test to see if I can read them. Let's say I copy and paste 45 images of Japanese symbols on to Sheet 2. on sheet 1, cells A1:K1 contain a formula which shows random whole numbers between 1 and 45 (these values change each time I press F9/re-calculate the sheet) on sheet 1, cells B1:K1 contain a formula which results in an image depending on what value is shown in the cell above it. So, whenever I press F9/recalculate the sheet, new images are instantly placed in cells B1:K1 for me to try and read. Hope that makes sense. Thanks again, AJ |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I insert a picture using a formula?
H AJ,
One way would be... Paste the 45 pictures onto sheet 1, select them all then run this macro to rename them systematically Pic1, Pic2 etc... Public Sub ReNamePics() Dim Pic As Shape, K As Long For Each Pic In Selection.ShapeRange Pic.Name = Pic.Name & Pic.Name Next Pic For Each Pic In Selection.ShapeRange K = K + 1 Pic.Name = "Pic" & K Next Pic End Sub Type the formula =RAND() into B1 then fill it across to AT1 for the 45 random numbers. Type 1 into B2 and 2 into C2. Select B2:C2 then fill across to AT2 to give the numbers 1 to 45 in B2:AT2 Make columns A to K wide enough so that they are able to accommodate the biggest of the 45 pictures. Control the visibility of the pictures using the following macro, which would be best run by assigning it to a Button from the Forms Toolbar. Sub ShowPics() 'Jumble row 1 (1 to 45) Range("B1:AT2").Sort Key1:=Range("B1"), _ Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlLeftToRight, _ DataOption1:=xlSortNormal Dim rngCell As Range Dim Pic As Shape 'Hide all Pics For Each Pic In ActiveSheet.Shapes 'Shape Type of a Picture is 13. If characters 'are not Pictures, eg AutoShapes, then 'code line below will need adjusting If Pic.Type = 13 Then Pic.Visible = False Next Pic 'Show Cell's B2:K2 Pic in row 3 For Each rngCell In Range("B3:K3") With ActiveSheet.Shapes("Pic" & _ rngCell.Offset(-1, 0).Value) .Visible = True .Top = rngCell.Top .Left = rngCell.Left End With Next rngCell End Sub If you are typing your answer and you want it checked, then you could use a VLOOKUP formula and a table (either hidden or on another sheet) with Picture number in the first column and correct answer in the second column Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert a variable into a formula | Excel Discussion (Misc queries) | |||
insert a picture based on a formula | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Insert Formula and Copy to other cells | Excel Discussion (Misc queries) | |||
Challenging Charting | Charts and Charting in Excel |