try to record a macro to do what you want then modify the code to suit