View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Sorting Check Boxes

How about an alternative?

Just use a cell in the same row, but format it to show a checkmark when there's
something in it?

I find this technique pretty easy...

Select the range
Format|cells|number tab|custom category
In the "type:" box, put this:
alt-0252;alt-0252;alt-0252;alt-0252

But hit and hold the alt key while you're typing the 0252 from the numeric
keypad.

It should look something like this when you're done.
ü;ü;ü;ü
(umlaut over the lower case u separated by semicolons)

And format that range of cells as Wingdings.

Now, no matter what you type (spacebar, x, anyoldtextatall), you'll see a check
mark.

Hit the delete key on the keyboard to clear the cell.

If you have to use that "checkmark" in later formulas:

=if(a1="","no checkmark","Yes checkmark")

And since this is just data, it'll sort with the other cells.

ZipCurs wrote:

I have a worksheet with data that I build and sort with macros to present the
data in different desirable fashion. Each line of the data has a check box
to allow a flag to be set by the user. Although the check box moves with the
data, the linked cell stays constant. As such, I need to delete all of the
check boxes, sort the data, and then recreate the check boxes. This works
but is a little time consuming. Is there a way to have the linked cell move
with the check box? For what it is worth, the cell is directly under the
check box.

Thanks


--

Dave Peterson