Introduction
Sometimes it is convenient to bring the created slides in a certain order. If this order can be calculated within Excel, then it is a piece of cake for SlideFab to change the order of the created slides in PowerPoint accordingly.
Overview
This tutorial follows up on the previous tutorial series which was about creating price tags. These price tags were created as PowerPoint slides with both a product name and a price. In this tutorial it will be explained how to change the order of slides in PowerPoint such that the cheapest product comes first.
What is required for this tutorial on How to change the order of slides in Powerpoint with SlideFab
Of course, SlideFab is required. For this example the free version SlideFab Lite is sufficient. Apart from this, the following is required as well.
The PowerPoint presentation with the linked Excel model from the first tutorial is the starting point.
Here we are using the PowerPoint template presentation which was linked to the Excel workbook from the previous tutorial series. This way we already have an Iteration Loop in place and also two connections between Excel cells and PowerPoint shapes, namely for product name and product price.
The output created so far is depicted below: For each row there is one slide. However, the order of products is still the name as in the original data.

To bring the slides in PowerPoint into the correct order, follow these steps.
Time needed: 7 minutes
- Setting up the Excel workbook and PowerPoint presentation in a linked way.
– Open the PowerPoint presentation and linked Excel file as it was explained before.
– Click the button “Advanced” within the SlideFab tab in the ribbon to open the side pane. - Tick the checkbox “Sort slides according to cell content” to enable the sorting feature and show additional controls
- Setting up the Sort Range for the presentation
– Select the cell with the current product price.
– Click the crosshair icon in the “Excel Sort Cell” control to define the link. SlideFab will write the address of the selected cell into the control field. - Now it seems time to create the PowerPoint slides in a sorted way
The setup to sort the slides is completed. There are more settings which don’t need to be changed at the moment, for example sort order (we stick to the default of ascending order).
Now, we will create the slides by clicking “Make Slides” and then hitting “Start” in the window that opens. This is also depicted in the previous tutorial.
The created slides are sorted now. However, something went wrong. SlideFab sorts the slide in alphabetical order. It does not know what format the values in the sort cell have. Could be dates, texts, numbers or even everything mixed. So it takes it literally.
Consequently, to have the slides ordered by price numerically, there is an additional step required. - Create a sorting cell which has textual entries while keeping the numerical order
At this point, we need to apply a little Excel magic to get things working. We will need to convert the prices into text entries in such a way that sorting the texts leads to the same outcome as sorting by the actual numbers.
This can be achieved by adding leading zeroes: So instead of comparing strings “1079.99” to “742.35”, we compare “01079.99” to “00742.35”. So all prices are padded with zeroes to have 5 characters for Euros / Dollars / Pounds, then the full stop and finally 2 characters for the cents.
So why 5 characters and not 4 in the beginning? For this example both work, obviously. But in real life it makes sense to have some reserve, in case there might be larger numbers, like a product for more than 9,999.99.
One formula to create the required output is:=TEXT(C3,"00000.00")
– In Excel in cell C6 create the formula which calculates a textual representation of the price with the formula above.
– Select the cell with the calculated sort order value.
– Click the crosshair icon in the “Excel Sort Cell” control to define the link. SlideFab will write the address of the selected cell into the control field. - Now it is again time to create the sorted PowerPoint slides
And again, we will create the slides by clicking “Make Slides” and then hitting “Start” in the window that opens. How this is done was pictured in the previous tutorial.
This time the slides are in the correct order. All product slides are sorted in ascending way from the cheapest product to the most expensive.
What comes after sorting the slides
So far the automation works properly and the output slides are sorted as well. The next tutorial will use the slide filter feature to create only slides for the three most expensive products.