Google Sheets IMAGE Function

excelbytes

Active Member
Joined
Dec 11, 2014
Messages
291
Office Version
  1. 365
Platform
  1. Windows
Is there any way to replicate the IMAGE function from Google Sheets in Excel? Maybe a VBA code? From what I can tell, the function in Google Sheets takes a URL and imbeds that image into a cell, not a hovered object like Excel would. The syntax is =IMAGE(url, [mode], [height], [width]). An example pulling in Google's logo is =IMAGE("https://www.google.com/images/srpr/logo3w.png").
 
You only need to do it once, though, right? If so, the subroutine proposal I made is likely the best option. Mind you, a spreadsheet with 1500 images in it was never really going to be nimble...

(Glad it's working for you now - am slightly concerned re: the upper case / lower case point, but let's not poke the VBA bear today)
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi - so I was thinking about your project, and the I'm thinking that:

First, using a worksheet function is not the best/quickest approach if, as it seems, you really only need to do it the one time. All you really need to do is download the images, and have them added to the spreadsheet - and on that front, we're in luck - the code is all there anyway, it just needs to be tweaked (by me) to be usable beyond the worksheet function context.

Second, the problem you're experiencing re: speed and size is conceivably solvable by (not meaning to sound facetious, but) changing the size of the images. The example URLs you sent through on Amazon servers were of varying sizes - one was tiny and one was gargantuan (<-an underused word). Depending on what your needs are, what we could do is create thumbnail/smaller versions of the downloaded photos if they happen exceed certain width/height dimensions. And then you could insert those thumbnail versions. Fortunately, the code for that is already written by one of the regular contributors on this forum, so it's certainly doable. It just depends on whether that is workable for your needs - if we make the images smaller, will that prove to be a problem for you?

Let me know, because I will have time to look at it (later-ish) this week if you'd like me to.
 
Upvote 0

Forum statistics

Threads
1,223,639
Messages
6,173,499
Members
452,517
Latest member
SoerenB

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top