Create IFRAME Code in Excel

Create IFRAME Code in Excel

If you want to embed a YouTube video on your website, YouTube will create some IFRAME code for you. If you want to embed content from somewhere else, you might have to create your own IFRAME code, or find a free generator somewhere in the interwebs. Or, you can download my sample file, and create IFRAME code in Excel.

iframecode04

Find Sample IFRAME Code

To create the code, I copied sample IFRAME code from my latest Excel tutorial on YouTube. That showed me all the variables – such as height and width – that I’d need to enter, to create my own version.

iframecode03

Enter the Variables

In an Excel file, I set up a worksheet with cells where you enter the variables. You’d have to change the video ID and name for each IFRAME , but could probably leave all the other settings the same:

iframecode01

Combine the Code Strings

In a cell below the variable entry section, I created an IFRAME formula that combines all the variables with the rest of the code. The formula looks complicated, but it’s just combining a bunch of things:

  • It uses the & operator, to combine text strings
  • The CHAR function uses 34 as its argument, to create double quote marks
  • The IF formulas return a variable based on Yes or No selections

iframecode02

Use the IFRAME Code

Here’s the result, when I copy the IFRAME/HTML code, and paste it into the HTML source code for this article.

  • The iframe code shows the video
  • Below that, the HTML code shows a text link.

This video won’t show you how to build an iframe, but it will show you the new SHEET and SHEETS functions!

Download the Sample File

To download the sample file, please visit my Contextures website. Go to the Sample Files page, and in the Functions section, look for FN0034 – Create IFRAME Code in Excel.

The zipped file is in xlsx format, and does not contain any macros.
_____________

0 thoughts on “Create IFRAME Code in Excel”

  1. thank you for the iframe example.
    what I want to do is take it one step further.
    like you I have built an iframe ‘string’ in excel. it points to an amazon associated widget.
    I want to EXCEUTE that ifrmae and display the resulting widget into my excel spreadsheet
    is that possible? ie I guess to display …. within a single excel cell ??/
    thank you for any pointers.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.