+ Reply to Thread
Results 1 to 11 of 11

Can you conditionally format a cell to display an image? rather than just background color

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Question Can you conditionally format a cell to display an image? rather than just background color

    I have a spread sheet with rollover effects to make certain cells turn green/blue when the mouse is hovering over them. however, Instead of turning green, can I make it show an IMAGE in the cell rather than go a colour?

    see attached.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Can you conditionally format a cell to display an image? rather than just background c

    It is possible. Not sure whether it can be done conditionally without the use of VBA however.

    Without VBA, just go to the 'Insert' Tab, then click insert picture. You can then fiddle with the format of the picture to ensure it fits the cell. Right click picture, click properties, then 'move & size with cell'.

    Hope this helps,

    TKCZBW

  3. #3
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Can you conditionally format a cell to display an image? rather than just background c

    thanks for the reply. But what I need is THAT to happen conditionally. e.g. only displays the image in cell when I hover over it. I basically need to exchange the green colour I currently have conditionally formatted (linked with the rollover hyperlink) with an image of my choice- which is an option it simple does not offer when conditionally formatting cells.

    I am more than happy to vba it. if you know how to do that of course or could give me an example>

  4. #4
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Can you conditionally format a cell to display an image? rather than just background c

    Give me a little while and I'll try and knock something up. It's a very interesting piece of code you have!

  5. #5
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Can you conditionally format a cell to display an image? rather than just background c

    ok thanks ha

  6. #6
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Can you conditionally format a cell to display an image? rather than just background c

    Here you go, I'm rather happy with this. Only downside is that the picture will still be 'selected'. There is also a tiny bug that When you so it in your 'blue' grid it mildy interferes with your 'green grid'. Nothing serious though.

    I have to leave the office now, but wil be back later. A very intriguing bit of code: thankyou!

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Can you conditionally format a cell to display an image? rather than just background c

    ok .wow. ha ill try it later.

    is this completely separate code to add to a module or to delete any previous and just go with this. cant tell instantly by looking at it

  8. #8
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Can you conditionally format a cell to display an image? rather than just background c

    Delete all that you have in 'Module1' and replace with this.

  9. #9
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Can you conditionally format a cell to display an image? rather than just background c

    you clearly have a better understanding of vba than me lol. I cant get it to work, because there is obviously code I need to adapt to be specific to me but im too new to this to figure it out without head exploding

  10. #10
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Can you conditionally format a cell to display an image? rather than just background c

    Can you tell me which lines it is erroring on, if any?

  11. #11
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Can you conditionally format a cell to display an image? rather than just background c

    It isn't showing errors, its just not doing anything, like I haven't put a code in at all. when I click "run"(triangle) 'in view code' it pops up like a macro I need to name instead of running the code to the sheet. if you get my point

    because im being stupid. could you possible highlight where in your code I have to edit for my sheet etc.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 02-25-2013, 03:36 AM
  2. Replies: 4
    Last Post: 02-14-2013, 01:45 PM
  3. Replies: 4
    Last Post: 09-15-2012, 02:46 PM
  4. how can I conditionally change font color, or background color?
    By MOHA in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2006, 01:57 PM
  5. [SOLVED] Conditionally setting background color of a cell
    By Scott Steiner in forum Excel General
    Replies: 1
    Last Post: 11-20-2005, 08:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1