Cell PhonesComputersConsumer ElectronicsGraphic Design & Video EditingHome Theater & AudioIndustrial TechnologyInternet

Renaming, Reordering, and Grouping Shapes in Excel 2007 and 2010

Updated on April 29, 2016

How to group, ungroup, rename and reorder Excel Shapes in Excel 2007 and Excel 2010

Shapes allow you to add visual impact to your worksheets and enable you to grab or direct the attention of a user of your spreadsheet using shapes such as red arrows.

  • You can use shapes with hyper links linked to other parts of your workbook to allow users to navigate around it using buttons.
  • In addition, shapes can have macros assigned to them so that they will run Visual Basic code when they are pressed.

In today’s hub, we will be looking at:

  • Renaming shapes is often necessary as Excel will name your shapes for you with names such as Rectangle 1 or Right Arrow 7 which are not very informative and can make identification tricky.
  • Reordering them as shapes are ordered in the order they were created, not alphabetically which can make manipulating them using Visual Basic tricky, as my example today will illustrate
  • Adding shapes to groups so that they can be manipulated as one group which allows you to manipulate a number of shapes quickly and easily which can make working with shapes much quicker and easier.

Examples of shapes that can be used to enhance spreadsheets in Excel 2007 and Excel 2010.
Examples of shapes that can be used to enhance spreadsheets in Excel 2007 and Excel 2010. | Source

I have another hub that covers creating and using some very useful shapes indeed, including a rounded rectangle complete with a hyper link, and my personal favourite and a shape that I use very frequently, the red arrow (as illustrated above). That hub can be found here:

http://robbiecwilson.hubpages.com/hub/Using-Shapes-in-Excel-2007

I also used shapes to create a thematic chart which I will use as the example as we work through this hub. A thematic chart allows you to visually show variations across a geographical area such as rainfall across the United States of America in a chart. To learn more about them as well as the Visual Basic code used to change the fill colours of the shapes, follow the link here:

http://robbiecwilson.hubpages.com/hub/How-to-create-a-thematic-or-Choropleth-map-in-Excel-2007-and-Excel-2010

Thematic chart created in Excel 2007 and Excel 2010 created using shapes and Visual Basic code.
Thematic chart created in Excel 2007 and Excel 2010 created using shapes and Visual Basic code. | Source

Renaming Shapes in Excel 2007 and Excel 2010

To allow you to more easily identify shapes and also to make writing Visual Basic code to manipulate those shapes you may need to rename them. There are two ways of renaming shapes:

First, you can select a shape in your workbook. The name of that shape appears in the box to the left of the formula bar as shown in the picture below (you can see my shape is called Montana):

Identifying the name of a shape in Excel 2007 or Excel 2010.
Identifying the name of a shape in Excel 2007 or Excel 2010. | Source

To change the name, simply rename it here and click Enter or Return to confirm it

The second method is to use the Selection Pane:

  • To access the Selection Pane, first, select a shape
  • Navigate to the Drawing Tools group of tabs and select the Format tab
  • In the Arrange group on that tab, select the Selection Pane button
  • This will open the pane to show you all the shapes on the active sheet

Use the Selection Pane in Excel 2007 and Excel 2010 to re-name and re-order shapes.
Use the Selection Pane in Excel 2007 and Excel 2010 to re-name and re-order shapes. | Source

From here, you can rename any of the shapes, by clicking on the name and then making any changes that you many need to make

Note: The list of shapes is not an alphabetic list, shapes are listed in the order they were created and will not resort themselves automatically.

Re-ordering Shapes in Excel 2007 and Excel 2010

When you rename shapes in Excel, they remain in the order that they were created, so this may make it difficult to use the shapes in a Visual Basic script.

For example:

My Thematic Chart uses Visual Basic that takes data from an external website and changes the fill colour of the shape representing each state based on the data provided. The data provided lists the states in alphabetical order. If the shapes are not also in alphabetical order then the thematic chart will not accurately represent the data. You can see from the figure above that the states are not alphabetical and therefore the resulting chart is not accurate.

To re-order shapes, we need to use the Selection Pane so that we can see the current order.

  • Next, we select a shape that we want to re-order
  • To move the shape, right click on the shape on the worksheet itself

Re-ordering shapes in Excel 2007 and Excel 2010 using the Selection Pane.
Re-ordering shapes in Excel 2007 and Excel 2010 using the Selection Pane. | Source

The two options you will need to use to move the shape, is Bring to Front and Send to Back

How to move a shape to a new place in the order in Excel 2007 and Excel 2010.

First Menu Option
Second Menu Option
Result
Bring to Front
Bring to Front
Shape is moved to the very top of the list
 
Bring Forward
Shape is moved one place higher
Send to Back
Send to Back
Shape sent to the very bottom of the list
 
Send Backward
Shape moves one place lower

Note: By holding down Control and selecting multiple shapes, you can move more than one shape at a time.

Now you can see from the figure below, that my shapes are now ordered in reverse alphabetical order which now means that the states are listed in the same order as my data.

Shapes now all correctly ordered using the Selection Pane in Excel 2007 and Excel 2010.
Shapes now all correctly ordered using the Selection Pane in Excel 2007 and Excel 2010. | Source

Now when I run my Visual Basic macro, I get a thematic chart that is consistent with the data provided from the external source.

Thematic chart showing the correct output data due to correctly ordered shapes in Excel 2007 or Excel 2010.
Thematic chart showing the correct output data due to correctly ordered shapes in Excel 2007 or Excel 2010. | Source

How to group and ungroup shapes in Excel 2007 and Excel 2010

When you group shapes, this allows you to make changes or select multiple shapes at one time. Grouped shapes can also be moved as a group and they will retain their positions relative to each other. There is two ways of grouping shapes:

  • Select all the shapes you want to place in the group
  • Right click and select Group and then group

Note: if these shapes were part of a previous group, there will also be an option to regroup.

Note: you can rename the group in exactly the same way you rename a shape

The second method is to select all the shapes as before

  • Select the Format tab which is part of Drawing Tools. Click the Group button which is in the Arrange group
  • To ungroup a group of shapes, repeat the above steps but select Ungroup rather than Group.

You can see a group that I have created below called Group 12. I can now select the group as a whole and configure the properties of all shapes in the group, or I can move the whole group as a whole by selecting it.

Shapes added to a group called Group 12 in Excel 2007 and Excel 2010.
Shapes added to a group called Group 12 in Excel 2007 and Excel 2010. | Source

Note: Should you want to change a single shape within the group, select the group and then click on an individual shape to change its individual properties.

Selecting a single shape within a group in Excel 2007 and Excel 2010.
Selecting a single shape within a group in Excel 2007 and Excel 2010. | Source

Conclusion

Shapes are very versatile and extremely useful devices for giving your spreadsheets more visual impact and allowing users to navigate around your workbook using hyper-links or to run code by pressing buttons.

In today’s hub, we looked at renaming and reordering shapes which is often necessary if you intend to write Visual Basic code to manipulate your shapes. Finally, we looked at grouping and ungrouping shapes to allow you to manipulate or move large numbers of shapes quickly and easily.

Many thanks for reading; I hope you found this hub useful and informative. Please feel free to leave any comments that you may have below.

© 2013 Robbie C Wilson

Comments

    0 of 8192 characters used
    Post Comment

    • Author

      Robbie C Wilson 20 months ago

      Thanks for your kind comment, I am so glad that you found it useful and informative.

    • pinkhawk profile image

      pinkhawk 20 months ago from Pearl of the Orient

      I'm lucky to find this, thanks for this interesting hub! I'll come back to check the other links as well.

    Click to Rate This Article