+ Reply to Thread
Results 1 to 3 of 3

VBA to insert images in a cell with dynamic URL

  1. #1
    Registered User
    Join Date
    08-24-2019
    Location
    US
    MS-Off Ver
    2010
    Posts
    4

    VBA to insert images in a cell with dynamic URL

    Hi Community,

    I have a workbook where Column A is for manual input of SKU#.
    I'd like to display an image of that product in Column B, where the image url has a static path except for the file name, which is the SKU#.

    As such: storewebsite.com/library/product_images/SKU#.jpg

    I'm looking for a VBA code where it will dynamically set the SKU# entered in Column A into the image url and auto display the image file in Column B.

    Example:

    A1 : 111
    B1 : <img src="storewebsite.com/library/product_images/111.jpg height="XXX" width="XXX" />


    Thanks in advance,

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: VBA to insert images in a cell with dynamic URL

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). 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.

  3. #3
    Registered User
    Join Date
    08-24-2019
    Location
    US
    MS-Off Ver
    2010
    Posts
    4

    Re: VBA to insert images in a cell with dynamic URL

    Thanks for the response. I've attached a sample workbook.

    I'm trying to figure out a VBA code that will display a web image in Column B if a value is entered in Column C.
    The image url is storewebsite.com/library/product_images/{value entered in Column C}.jpg

    So I need 2 functions.

    1. The function to grab the value in Column C and insert that value in the image url to complete the web image url.
    2. The function to embed/display that image in Column B with a set height x width.
    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. Batch insert images in cell comments
    By Saighead in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2018, 03:58 PM
  2. Insert multiple Images to match with filename in Merge cell and Unmerge cell
    By JoeyscLee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2016, 09:46 AM
  3. [SOLVED] Macro to insert url images into cell ?
    By jkm500 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-21-2015, 08:29 AM
  4. Macro to insert Google images into cell
    By mhisan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2014, 01:59 PM
  5. Insert Images, scale to fit a cell size, maintain aspect ratio?
    By monet60707 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2013, 02:02 PM
  6. [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
  7. Insert Images to Cell Column A based on Cell Value in column B
    By fyremaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2013, 06:25 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