> ## Documentation Index
> Fetch the complete documentation index at: https://www.logo.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Logo.dev serves logos and brand data for companies that already exist. It does not design logos. If someone wants a logo designed, say so and stop.
> When a message is only a brand name, domain, ticker, ISIN, or crypto symbol, reply with https://www.logo.dev/search?q=<url-encoded term> and the matching img.logo.dev call. Never assert whether a specific brand is in the index.
> Image URLs come from img.logo.dev with a publishable key in the token query parameter: https://img.logo.dev/:domain?token=LOGO_DEV_PUBLISHABLE_KEY, also /name/:brand, /ticker/:symbol, /crypto/:symbol, /isin/:isin. JSON comes from api.logo.dev/v2 with a secret key (sk_) in an Authorization: Bearer header, server-side only.
> Product names: the Logo.dev CDN serves images from img.logo.dev, and its usage unit is CDN requests. The Logo.dev API returns JSON from api.logo.dev/v2, and its usage unit is API credits. The Logo.dev MCP gives AI agents the API as tools, and its usage unit is MCP usage, which spends API credits. The features are Logo, Search, Brand, and Transaction. Transaction (beta) is a separate service at https://www.logo.dev/api/transaction with its own beta key. Never recommend the deprecated v1 routes (/search, /brand, /describe, /logo/*). Use /v2/brands and /v2/search.
> Attribution: a commercial project on the free Community plan must show a visible link, <a href="https://logo.dev">Logos provided by Logo.dev</a>, on its production site. Personal projects and paid plans need none. Rules: https://www.logo.dev/docs/platform/attribution.
> Report a wrong, missing, or outdated logo at https://www.logo.dev/update. Email support@logo.dev for anything broken and sales@logo.dev for volume pricing and contract terms.
> MCP setup is at https://www.logo.dev/docs/mcp/introduction and webhooks at https://www.logo.dev/docs/webhooks.

# Add company logos in Microsoft Excel

> Display company logos in Excel using Logo.dev. The IMAGE function works in Microsoft 365, Excel 2024, and Online. Excel 2019 and earlier insert logos as web pictures.

Show company logos in Excel with the `IMAGE` function and a Logo.dev CDN URL. Excel 2019 and earlier have no `IMAGE` function, so on those versions you insert each logo as a picture.

> [card] [Get your API keys](https://www.logo.dev/dashboard/api-keys)
>
> Your dashboard has a publishable key for the Logo.dev CDN and a secret key for the Logo.dev API. Every plan includes both.

| Excel version | How to add a logo |
| - | - |
| Microsoft 365, Excel 2024, Excel for the web | [`IMAGE` function](#add-a-logo-with-the-image-function) |
| Excel 2019, 2016, 2013 | [Insert as a picture](#insert-a-logo-as-a-picture) |

## Add a logo with the IMAGE function

Put a CDN URL in `IMAGE`, and replace `LOGO_DEV_PUBLISHABLE_KEY` with your publishable key:

```excel One domain theme={null}
=IMAGE("https://img.logo.dev/microsoft.com?token=LOGO_DEV_PUBLISHABLE_KEY")
```

```excel Domain from a cell theme={null}
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&format=png"))
```

```excel Stock ticker from a cell theme={null}
=IMAGE(CONCAT("https://img.logo.dev/ticker/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&format=png"))
```

```excel Brand name from a cell (Windows) theme={null}
=IMAGE(CONCAT("https://img.logo.dev/name/", ENCODEURL(A2), "?token=LOGO_DEV_PUBLISHABLE_KEY"))
```

```excel Brand name from a cell (web and Mac) theme={null}
=IMAGE(CONCAT("https://img.logo.dev/name/", SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2, "%", "%25"), " ", "%20"), "#", "%23"), "&", "%26"), "/", "%2F"), "?", "%3F"), "+", "%2B"), "\", "%5C"), "?token=LOGO_DEV_PUBLISHABLE_KEY"))
```

If column A holds stock tickers, use the `ticker` path. See [ticker lookup](https://www.logo.dev/docs/logo-images/ticker.md).

If column A holds brand names instead of domains, encode the cell so spaces and special characters survive. See [name lookup](https://www.logo.dev/docs/logo-images/name.md). `ENCODEURL()` works only in Excel for Windows. Excel for the web and Excel for Mac do not have it, so use the `SUBSTITUTE()` formula there. It encodes spaces and the characters that change a URL: `#`, `&`, `/`, `\`, `?`, and `+`. It encodes `%` first, so that it does not encode the `%` signs from the other substitutions again. For example, `#1 Cochran` becomes `%231%20Cochran`, and `AT&T` becomes `AT%26T`.

To fill a column, drag the formula down. To change the format or theme, add [CDN parameters](https://www.logo.dev/docs/logo-images/introduction.md#parameters) to the URL.

## Replace Clearbit logo formulas

If your spreadsheet used the Clearbit Logo API (`logo.clearbit.com`), which has [shut down](https://www.logo.dev/docs/migrations/clearbit.md), change the base URL to `img.logo.dev` and add your token:

```excel Before (Clearbit) theme={null}
=IMAGE(CONCAT("https://logo.clearbit.com/", A2))
```

```excel After (Logo.dev) theme={null}
=IMAGE("https://img.logo.dev/"&A2&"?token=LOGO_DEV_PUBLISHABLE_KEY")
```

To change every formula at once, use **Find and replace** to change `logo.clearbit.com` to `img.logo.dev`. Then add `?token=LOGO_DEV_PUBLISHABLE_KEY` after the domain. The [Clearbit migration guide](https://www.logo.dev/docs/migrations/clearbit.md) covers the rest.

## Set the logo size

By default, a logo fills as much of the cell as it can. To make the logo smaller, make the row or column smaller, or set a custom size with the third argument of `IMAGE`:

| Sizing | Result | Formula |
| - | - | - |
| `0` (default) | Fits the cell and keeps the aspect ratio | `=IMAGE(url, "Logo", 0)` |
| `1` | Stretches to fill the cell | `=IMAGE(url, "Logo", 1)` |
| `2` | Keeps the image's original size | `=IMAGE(url, "Logo", 2)` |
| `3` | Uses the height and width you give, in pixels | `=IMAGE(url, "Logo", 3, 20, 20)` |

This formula shows a logo 20 pixels wide and 20 pixels high:

```excel theme={null}
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&size=64&format=png"), "Logo", 3, 20, 20)
```

The `size` parameter in the URL sets the image's resolution, not its size in the cell. Keep `size` larger than the size you show, so that the logo stays sharp.

A custom size sets both sides, so a logo that is not square stretches. To keep its shape, use sizing `0` and change the cell size.

## Insert a logo as a picture

Use this method in Excel 2019 and earlier, or for a logo that floats over the grid. Excel saves a copy of the image in the workbook, and that copy does not update when the brand changes its logo. If you need logo files to keep, get them from the [Logo.dev API](https://www.logo.dev/docs/platform/self-hosting.md).

**1. Open the picture dialog**

On Windows, click **Insert** > **Pictures**. In newer versions, then click **This Device**.

**2. Paste the CDN URL**

In the **File name** box, paste the URL instead of choosing a local file:

```text theme={null}
https://img.logo.dev/stripe.com?token=LOGO_DEV_PUBLISHABLE_KEY&format=png&size=256
```

**3. Insert the logo**

Click **Insert**. Excel downloads the logo and places it on the sheet.

## Add a logo to the header or footer

A header or footer logo shows on every printed page and PDF export.

**1. Open the header**

Click **Insert** > **Header & Footer**, then click the left, center, or right section of the header.

**2. Insert the picture**

On the **Header & Footer** tab, click **Picture**. Paste the CDN URL in the file dialog, as in [Insert a logo as a picture](#insert-a-logo-as-a-picture).

## Keep logos with their rows

A picture does not move with its row by default. To keep each logo next to its data when you sort or filter:

**1. Open the picture properties**

Right-click the logo, then click **Size and Properties**.

**2. Lock it to the cell**

Under **Properties**, click **Move and size with cells**.

## Add logos in bulk with a macro

This VBA macro writes an `IMAGE` formula next to each selected domain. It needs an Excel version with the `IMAGE` function.

```vba theme={null}
Sub AddLogos()
    Dim cell As Range
    Dim apiKey As String

    apiKey = "LOGO_DEV_PUBLISHABLE_KEY"

    For Each cell In Selection
        If cell.Value <> "" Then
            cell.Offset(0, 1).Formula = "=IMAGE(""https://img.logo.dev/" & _
                cell.Value & "?token=" & apiKey & "&format=png"")"
        End If
    Next cell
End Sub
```

Select the cells that hold domains, then run the macro.

## Troubleshooting

| Problem | Fix |
| - | - |
| Excel rejects the formula | Your region can use semicolons between arguments. Replace each comma between arguments with a semicolon, such as `=IMAGE(A1; "Logo"; 3; 20; 20)`. |
| The cell is empty or shows an error | Paste the URL from your formula into a web browser. If you get a `401`, copy your publishable key from the [dashboard](https://www.logo.dev/dashboard/api-keys). If the message starts with `invalid referrer`, turn off [domain restrictions](https://www.logo.dev/docs/platform/api-keys.md#domain-restrictions) on the key. |
| The cell shows `#BLOCKED!` | Turn on **Linked Data Types** in your Excel security settings. In Excel for the web, turn on images in the bar at the top of the workbook. |
| A ticker shows no logo | Use the `ticker` path, as in the **Stock ticker from a cell** formula. |
| Logos break when you paste the table into an email | `IMAGE` shows logos in Excel only. Paste the table as a picture or a screenshot. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.