Sort Pictures With Data


September 05, 2022 - by

Sort Pictures With Data

Problem: My manager wants me to add employee pictures to the department phone list. I need the pictures to sort with the data.

Strategy: By default, this will work. Each picture has a property that will cause it to move but not size with cells. To see the property, select the picture and press Ctrl + 1. There are 16 categories in the left bar of the Format Picture dialog. Near the bottom, choose Properties. The Move But Don’t Size with Cells should already be selected.


An employee roster. Name in A, Phone Extension in C. Each of the B cells contain a photo of the person.
Figure 663. Sort the list alphabetically.

Gotcha: I am guessing that you wouldn’t be looking up this topic unless the sort already failed for you. I’ve had to troubleshoot this before and it always comes down to one issue.

Select one cell in column A and sort with the AZ button. The pictures should move with the names.

If you sort by name in column A, the photos in column B will sort with the cell. Be careful to never let a photo move so it crosses into the cell above.
Figure 664. The pictures will sort with the rows.


The process of inserting and resizing pictures is a mind-numbing process. You must be certain that every picture is completely contained within one cell. If the picture extends by even one pixel over the top edge of a cell, it will not be sorted correctly.

Here, the photo in cell B3 is shown just barely encroaching on B2. Since the B3 image is set to show behind the image in B2, it is really hard to notice the problem.
Figure 665. This picture is a few pixels too high. It will not sort..

This article is an excerpt from Power Excel With MrExcel

Title photo by elCarito on Unsplash