title: Trying to Replicate the 'IMAGE()' Function from Google Sheets in Excel
body: <p>I need a quick and visual way to see if my Image URLs are correct and representative of the data given. I need a function (like Google's 'Image()') to quickly preview a URL image.</p>
  <p>So far, I've been able to load an image with my own 'image()' function but it places the image as a floating element. Is there a way to force the image inside the cell and expand the cell to the image height and width of 100x100? &lt;&lt; This allows me to fill and see results for multiple rows of data.</p>
  <p>Here is my VBA code so far:</p>
  <pre><code>Function Image(url As String)
      Dim pic As Picture
      Dim pcell As Range
          Set pcell = Application.Caller
      
          Set pic = ActiveSheet.Pictures.Insert(url)
          With pic
          .ShapeRange.LockAspectRatio = False
          .Left = pcell.Left
          .Top = pcell.Top
          .Width = pcell.Width
          .Height = pcell.RowHeight
          .Placement = xlMoveAndSize
          End With
  
      Exit Function
  End Function
  </code></pre>
  <p>I'm not super familiar with VBA. Please explain any coded solution.</p>