+ Reply to Thread
Results 1 to 9 of 9

Insert picture based on cell value

  1. #1
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Insert picture based on cell value

    Hello,

    I have a list of variables that correspond to nation abbreviations, like this:
    ned = "The Netherlands"
    ger = "Germany"

    I also have cells with the same values as the variables. What I want to do is to insert a comment in the cell containing the full name of the county.

    I've done this with if-statements, like the one below, but there has to be a better way than that. Does anybody have a suggestion how I could do this more efficient than if-statements?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert picture based on cell value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Insert picture based on cell value

    I've attached an example workbook. However in this workbook I don't make any use of the variables since I don't know how to do that :-)
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Insert picture based on cell value

    Sorry, attached the wrong file
    Attached Files Attached Files

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert picture based on cell value

    So where is the list of complete names - we would need that more than anything?

  6. #6
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Insert picture based on cell value

    In modul1 of the example workbook

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert picture based on cell value

    try:

    Please Login or Register  to view this content.
    Last edited by xladept; 10-11-2017 at 06:28 PM.

  8. #8
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Insert picture based on cell value

    Thanks, that worked.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert picture based on cell value

    You're welcome and thanks for the rep!

+ 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. Excel VBA to insert & resize picture based on cell url
    By shabeersa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2016, 03:54 AM
  2. [SOLVED] Insert picture based on cell value
    By magman1984 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-19-2015, 10:05 AM
  3. Insert Picture based on Cell Value without Macro
    By greggatz in forum Excel General
    Replies: 2
    Last Post: 03-31-2015, 07:38 PM
  4. [SOLVED] Insert Picture in cell, click commanbutton to rename picture, lock cell and remove button
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2014, 10:05 PM
  5. Macro to insert picture in cell based off a value in same cell
    By Greybeard84 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2014, 06:36 AM
  6. Insert Picture based on what is typed in Cell?
    By Mile029 in forum Excel General
    Replies: 1
    Last Post: 04-19-2013, 06:10 AM
  7. [SOLVED] macro: insert picture based on workbook location, not picture root path.
    By NicksDad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2012, 07:47 AM

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