Sorry forgot to test whether it works when there's only 1 row of data. This one should work properly now.
If you're going to copy the code to a module (in order to assign macro), you need to remove the word "Private" in the first line, and maybe change the name to something that makes more sense, e.g.:
There are 2 kinds of button you can create in Excel, Forms and ActiveX. The one used in this sample workbook is an ActiveX button, with its code in a Worksheet. If you want the one that allows you to assign macro, use the Forms Control button.
Bookmarks