Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Sorting with Graphics.

Sorting with Graphics

by Allen Wyatt
(last updated March 26, 2019)

5

You already know that Excel allows you to place graphics in your worksheets. You may not know, however, that Excel allows you to sort graphics along with the regular data in your tables. For instance, you could create an inventory table that has the requisite part numbers, descriptions, and quantities. You could also include a column that shows a small picture of each inventory item. When you later sort the table, the pictures sort right along with the rest of the data in the table.

If you can't seem to make the graphics sort along with the other data in the table, keep these pointers in mind:

  • The graphics have to be sized so they fit completely within the cell. They cannot be taller or wider than the cell over which you placed them.
  • You should make sure that the sorting function is selecting the column in which your graphics have been placed. You can check this by seeing if the column is selected when you use the Sort tool on the Data tab of the ribbon.

If your graphics still won't sort, the properties of the graphic may have been changed to prohibit sorting. Follow these steps if you are using Excel 2007:

  1. Right-click on a graphic image. Excel displays a shortcut menu.
  2. Choose Size and Properties from the shortcut menu. Excel displays the Size and Properties dialog box.
  3. Make sure the Properties tab is selected. (See Figure 1.)
  4. Figure 1. The Properties tab of the Size and Properties dialog box.

  5. Make sure the Move and Size with Cells option is selected.
  6. Click on Close.
  7. Repeat steps 1 through 5 for all the graphics in the column.

The steps are different for users of Excel 2010:

  1. Right-click on a graphic image. Excel displays a shortcut menu.
  2. Choose Size and Properties from the shortcut menu. Excel displays the Format Picture dialog box with the Size option selected at the left.
  3. At the left side of the dialog box choose Properties.
  4. Make sure the Move and Size with Cells option is selected.
  5. Click on Close.
  6. Repeat steps 1 through 5 for all the graphics in the column.

If you are using Excel 2013 the steps are different still:

  1. Right-click on a graphic image. Excel displays a shortcut menu.
  2. Choose Size and Properties from the shortcut menu. Excel displays the Format Picture task pane at the right side of the screen.
  3. Make sure the Size and Properties icon is selected. (It should be by default. If not, it looks like a square with size markings on it.)
  4. Expand the Properties section. (See Figure 2.)
  5. Figure 2. The Properties settings in the Format Picture task pane.

  6. Make sure the Move and Size with Cells option is selected.
  7. Repeat steps 1 through 5 for all the graphics in the column.
  8. Close the task pane.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6139) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Sorting with Graphics.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

AutoText Unavailable in Headers and Footers

When you are creating headers and footers for your document, you might want to use some of your AutoText entries. What if ...

Discover More

Positioning a Column on the Screen

If you have static columns and dynamic columns on the screen, you may want the dynamic columns to always show a ...

Discover More

Forcing a Complete Spelling and Grammar Check

There are a couple of ways that various parts of a document can have spelling and grammar checking "turned off." This tip ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Incorrect Links after Sorting Hyperlinks

When you sort your data you should always check to see if the sort was done correctly. What if sorting messes up ...

Discover More

Incomplete and Corrupt Sorting

Using the sorting tools, on the toolbar, may result in some unwanted results, such as jumbled data. If this happens to ...

Discover More

Preventing Jumbled Sorts

Click the Sort tool in Excel, and you may be surprised that the data in your worksheet is jumbled. In order to sort ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight more than 3?

2017-04-04 10:01:53

Name

Sort of works, but if sorted the graphics resize based on cell height. So if you have different cell heights in a sheet the graphics' proportions get messed up every time.


2016-01-29 18:36:48

Ferante

i am on Excel for MAC 2011. It did not work for me. I right-clicked on each image, selected Format Picture, then Properties, then Move and Size with Cells. I also noticed that the three fields (Print Object, Lock, and Lock Text) were all selected. If I tried to deselect any of them, the system would revert back to the previou setting.


2016-01-25 14:51:24

Warren

Thanks for the tip, but a little more information would help. At first it didn't seem to work. I had two column, my images in A, and text in B. I highlighted B (the column with text) and sorted, only to find that the images didn't stay with their associated text. Then I highlighted both the column with the images, A, and the column with text, B. Next I used the more complicated version of the sort feature and selected column B. The images stayed with their row!


2015-07-30 16:07:29

Mary

I had this problem, I'm on a MAC and realized that it works fine on a PC. So try a PC if you're on a MAC.


2015-07-11 01:16:32

Nazeel Ahmad

Dear All!
I am still facing a problem to sort the data with parts images. I tried all the methods which discussed here. any one please help me, why I am not able to sort it. I am using MS Excel 2010 (2014).
Thanks


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.