+ Reply to Thread
Results 1 to 8 of 8

Images in IF statements

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    11

    Images in IF statements

    I've seen various answers for this on different websites and either they are for old versions of Excel or the instructions are really unclear - would very much appreciate some help on this.

    Basically I've got 2 columns like in the picture below:

    Columns.JPG

    In the 3rd and 5th columns I want there to be either a red arrow pointing down or a green arrow pointing down depending on whether the value of the cell next to it has increased or decreased compared to the previous month (the current conditional formatting is simply based on whether the percentage exceeds a certain acceptable level, or doesn't as the case may be). I have the two images and tried using IF statements to make the images display but as the images "float above" cells rather than are contained in them I am unable to do that.

    Would be grateful to anyone that can point me in the right direction!

    Thanks.

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Images in IF statements

    If there are not many you can set up conditional formatting for each line to do this. The icon sets will not allow you to use relative formulas though so it will be a little more work with having a different condition for each cell. That is the only way I know of how to do what I think you are describing.
    Despite the high cost of living, it remains very popular.

    Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!

  3. #3
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Images in IF statements

    Have you tried using Wingdings?


    Have added symbols to cells H1:J1, formatted cells as Wingdings. Made them named ranges (Up, Down & Equal)

    Then used following formula =IF(C2>A2,Up,IF(C2<A2,Down,Equal)) in cell D2. Result is Up Arrow for a rise Down arrow for a drop Double arrows for equal

    Windy
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-11-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    11

    Re: Images in IF statements

    Thanks guys - Windy, that worked perfectly, although I've now opted for using symbols rather than Wingdings and then conditional formatting to control whether the arrow is red or green depending on whether it's going up or down so yeah great and really simple idea - thanks!

    Couple of (hopefully) quick questions to round off -

    1. As you can see from the image I posted, I have created a new column to put the arrows in - I've removed the line between the two cells from the same month and I want the colour of the cell to match the colour in the adjacent cell, the colour of which is controlled by conditional formatting based on whether it is above or below an absolute value. Can I use more conditional formatting to do this?

    2. I've also got a line graph underneath mapping the changes over time - is there a way to keep this line graph despite the columns no longer being adjacent to eachother?

    Really appreciate the help!

  5. #5
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Images in IF statements

    Could you upload a sample workbook as it would be easier to see exactly what you have got at the moment.

    It only needs a sample of data, the chart and any formulas/conditional formatting used.

    Windy

  6. #6
    Registered User
    Join Date
    09-11-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    11

    Re: Images in IF statements

    Actually ignore the first question there - phrased it really badly and actually I've managed to do it.

    The only problem I'm having is that I want to create a line graph from the data but the columns are no longer adjacent. Is there a way of creating the line graph without creating a new table and having the data copied over?

  7. #7
    Registered User
    Join Date
    09-11-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    11

    Re: Images in IF statements

    Here's the sample workbook with formatting etc.

    Sample Workbook.xlsx

    The line graph below the data obviously looks really strange and I'm unsure how to fix it.

    TIA

  8. #8
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Images in IF statements

    I have adapted your sample, removed the merged cells then selected the columns I wanted in the graph.

    Then manipulated the values on the axis to suit.

    Is this what you are after?

    Windy
    Attached Files Attached Files

+ 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: 0
    Last Post: 01-01-2014, 04:36 PM
  2. Replies: 2
    Last Post: 06-18-2013, 12:15 PM
  3. [SOLVED] Swap images depending on text in cell (vlookup for images??)
    By ld2x07 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-06-2013, 10:32 AM
  4. Use of images within IF statements in Excel
    By topgrin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-21-2013, 12:28 PM
  5. How to save Linked images on excel as embedded images.
    By jonelamora in forum Excel General
    Replies: 0
    Last Post: 04-18-2013, 10:29 PM

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