MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Button to sort column of numbers

Posted by David Olsen on February 07, 2000 3:05 AM

I have a client who needs me to design a spreadsheet with a button at the bottom of a column of numbers that can be pushed and then it will sort the numbers for smallest to largest.

Does anyone know how to do this? Where to find scripts if they are needed for this?

I know this may sound like a basic question, but I'm a fairly new user of excel.


Posted by david olsen on February 07, 2000 3:06 AM

Posted by H Potter on February 07, 2000 6:47 AM

The simplest way is to record a macro. Manually perform the sort while recording. When you've finished, stop the recording. From the forms toolbar, select a button, and assign your newly recorded macro to the button.
This works if the area you want sorted is constant. If it varies, then the macro will need some more sophisticated logic added to find the range you want sorted. Post again, if you need further direction.

Posted by David Olsen on February 09, 2000 8:13 AM

Thanks for the help

thanks for the help. This worked exactly as you said.

I really appreciate the tip.