Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert a variable into a formula pappy Excel Discussion (Misc queries) 1 August 4th 06 01:45 PM
insert a picture based on a formula Analyst Excel Worksheet Functions 1 July 20th 06 01:07 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Insert Formula and Copy to other cells [email protected] Excel Discussion (Misc queries) 1 August 12th 05 08:51 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"