+ Reply to Thread
Results 1 to 6 of 6

Replace image URLs in cells with photos?

  1. #1
    Registered User
    Join Date
    09-02-2015
    Location
    Earth
    MS-Off Ver
    2013
    Posts
    2

    Question Replace image URLs in cells with photos?

    I am pretty clueless with Excel so I could use some assistance on this. I have searched but none of the macros I have tried have worked. My basic understanding is that you need to create a module in the MVB for Applications screen (F11) and set up a macro (F8) to run in the Excel sheet.

    Basically, I have an Excel sheet with URLs in column "AP" that I want to replace with the images they link to. I think I should note that the image URLs don't actually end in an image file extension such as .jpg, but they do lead to image files when copy and pasted into a browser.

  2. #2
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Replace image URLs in cells with photos?

    • ALT+F11…to open the VBA editor
    • Insert.Module…to create a new module for the current workbook
    • Copy the below code and paste it into that module:
    Please Login or Register  to view this content.
    To use that code:
    1)Select a vertical range of cells containing complete paths to picture
    files.
    (Make sure the row heights are large enough to view the pictures.)

    2)Run the macro
    • [Alt]+[F8]...to open the macro window
    ...Select: RunInsertPicFromFile
    ...Click [Run]

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-02-2015
    Location
    Earth
    MS-Off Ver
    2013
    Posts
    2

    Re: Replace image URLs in cells with photos?

    Thank you, Ron; it appears that this is working. Is it normal for Excel to act like it's frozen when it is pulling images? It seems to take a good while just to grab and insert one image.

  4. #4
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Replace image URLs in cells with photos?

    Possibly...It depends on the size of the image, its location, and your connection speed.
    You could try turning calculation to Manual before running the macro...then setting it back to automatic when it's done.

  5. #5
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Replace image URLs in cells with photos?

    If that resolves your issue, please take a moment to mark this thread as SOLVED (from the Thread Tools menu)

  6. #6
    Registered User
    Join Date
    01-03-2018
    Location
    Ottawa, Canada
    MS-Off Ver
    2010
    Posts
    1

    Re: Replace image URLs in cells with photos?

    Using Excel 2010, I've been able to retrieve dynamically generated graphs (Alexa Traffic Rankings) into Excel using the VBA code provided here, but ONLY 5% of the ones I want. While it retrieves these graphs from major websites:

    http://traffic.alexa.com/graph?o=f&w...&u=www.wsj.com
    http://traffic.alexa.com/graph?o=f&w...ww.nytimes.com
    http://traffic.alexa.com/graph?o=f&w...stonherald.com

    It won't retrieve these:

    https://traffic.alexa.com/graph?o=f&...e2language.com
    https://traffic.alexa.com/graph?o=f&....ec-edclub.com
    https://traffic.alexa.com/graph?o=f&....learningu.com
    https://traffic.alexa.com/graph?o=f&....ecominc.co.jp
    https://traffic.alexa.com/graph?o=f&...ww.edoopad.com

    Any idea why? Or a workaround to try?

+ 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. How To Use Find and Replace with a List of URLs
    By TrafficTrader in forum Excel General
    Replies: 1
    Last Post: 05-18-2014, 07:15 PM
  2. VBA Insert all Photos from folder - photos not lined up w/ cell borders in older versions
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 02:26 PM
  3. replace image object with another image
    By MKKEXCEL in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2012, 03:56 PM
  4. Converting text URLs to hyperlinked URLs
    By ranchhand in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2011, 01:46 PM
  5. Can I replace different urls in selected column with "Click Here" with a Macro?
    By nono77 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2011, 09:47 AM
  6. [SOLVED] Replace 'X with an image?
    By Some Dude in forum Excel General
    Replies: 2
    Last Post: 05-31-2006, 12:10 PM
  7. [SOLVED] Changing Photos in a Image Object
    By Troubled User in forum Excel General
    Replies: 1
    Last Post: 01-14-2006, 09:55 PM

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