Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Can I include a picture in a formula i.e. if cell a26 90% then show picture
x, if less then show picture y?... |
#2
![]() |
|||
|
|||
![]()
Maybe you could do something like JE McGimpsey does at:
http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Many thanks - just what I'm llooking for.
Paul "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I can't figure out how to insert the pictures? HELP. I can modify the
PicTable on sheet 2 to expand the name range but I haven't been successful in loading the pictures. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
JE's routine assumes that the pictures are already on the worksheet.
So load your pictures manually (or anyway you know), then use JE's code to hide/show the ones you want. Iriemon wrote: I can't figure out how to insert the pictures? HELP. I can modify the PicTable on sheet 2 to expand the name range but I haven't been successful in loading the pictures. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi I love this, would there be a way of altering the code so that it does not
effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe you can just check the name and then do nothing for that name:
Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Dave,
I tried the following as below, but its ends up with a compile error. Thanks for trying. Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("E30") For Each oPic In Me.Pictures If oPic.Name = "Picture 1" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If Next oPic End With End Sub "Dave Peterson" wrote: Maybe you can just check the name and then do nothing for that name: Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You dropped an "End If" line near the bottom.
I'm not sure if your code is indented (or if just the message was not), but indenting can make finding errors like this easier to find. And it would help others if you indicated the line that was marked as an error and what that error is, too. Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("E30") For Each oPic In Me.Pictures If oPic.Name = "Picture 1" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If '<--- Added Next oPic End With End Sub Newbeetle wrote: Hi Dave, I tried the following as below, but its ends up with a compile error. Thanks for trying. Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("E30") For Each oPic In Me.Pictures If oPic.Name = "Picture 1" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If Next oPic End With End Sub "Dave Peterson" wrote: Maybe you can just check the name and then do nothing for that name: Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Dave Peterson" wrote: Maybe you can just check the name and then do nothing for that name: Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to do the same thing as the other gentleman but apparently I am
missing something. I have entered what you have below but my logo "Picture 1" keeps disappearing everytime I use the other event (I have it inserting a signature upon a person's name). ***Please help! "Dave Peterson" wrote: Maybe you can just check the name and then do nothing for that name: Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Did you change the name of the picture in the code?
chrstrcy wrote: I am trying to do the same thing as the other gentleman but apparently I am missing something. I have entered what you have below but my logo "Picture 1" keeps disappearing everytime I use the other event (I have it inserting a signature upon a person's name). ***Please help! "Dave Peterson" wrote: Maybe you can just check the name and then do nothing for that name: Option Explicit Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = "Nameofpicturethatshouldnotchange" Then 'do nothing Else If oPic.Name = .Text Then oPic.Visible = True oPic.Top = .Top oPic.Left = .Left Exit For End If End If Next oPic End With End Sub Newbeetle wrote: Hi I love this, would there be a way of altering the code so that it does not effect one chosen picture, the reason for this is I always want one picture to be visible at all times as its a logo. "Dave Peterson" wrote: Maybe you could do something like JE McGimpsey does at: http://www.mcgimpsey.com/excel/lookuppics.html PACF wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#13
![]() |
|||
|
|||
![]()
PACF
Not a formula, but using worksheet event code. See JE McGimpsey's site for code and instructions. http://www.mcgimpsey.com/excel/lookuppics.html Gord Dibben Excel MVP On Wed, 2 Feb 2005 02:43:05 -0800, "PACF" wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... |
#14
![]() |
|||
|
|||
![]()
Many thanks - just what I needxed.
Paul "Gord Dibben" wrote: PACF Not a formula, but using worksheet event code. See JE McGimpsey's site for code and instructions. http://www.mcgimpsey.com/excel/lookuppics.html Gord Dibben Excel MVP On Wed, 2 Feb 2005 02:43:05 -0800, "PACF" wrote: Can I include a picture in a formula i.e. if cell a26 90% then show picture x, if less then show picture y?... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell shows formula and not the result of the formula. | Excel Worksheet Functions | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
looking for a formula | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions |