Hi Eve
As Brad rightly says, this would require you to write a VBA sub procedure.
If you have a copy of John Walkenbach's excellent book "Excel 2002 Power
Programming with VBA" John actually uses this very subject as an example of
how to plan and build a VBA sub procedure. It starts on page 241 of his
book, and the finished procedure is listed on pages 253 & 254.
Regards
John WEC