Mudraker suggests recording a macro to do this

http://www.excel-it.com/record_macro.htm